Hypnagogia is the transitional state from wakefulness to sleep, also defined as the waning state of consciousness during the onset of sleep.