Hypnagogia

Hypnagogia is the transitional state from wakefulness to sleep, also defined as the waning state of consciousness during the onset of sleep. Its corresponding state is hypnopompia sleep to wakefulness. Mental phenomena that may occur during this "threshold consciousness" include hallucinations, lucid dreaming, and sleep paralysis.