Hypnagogia
The writings of Aristotle already talk  about hypnagogia. In more recent centuries, many authors have referred to the state. Edgar Allan Poe, for example, wrote of the "fancies" he experienced "only when I am on the brink of sleep, with the consciousness that I am so".