Hypnopompia

Hypnopompia is the state between sleep and wakefulness (as in a person awakening from sleep), as opposed to hypnagogia, the state between wakefulness and sleep (as in a person falling asleep).