Nighttime “visitations” may be chalked up to sleep deprivation, to hypnagogic or hypnopompic hallucinations.
1868, from French hypnagogique, from Greek hypnos "sleep" (see somnolence) + agogos "leading" (see act). Etymologically, "inducing sleep," but used mostly with a sense "pertaining to the state of consciousness when falling asleep."
hypnagogic hyp·na·gog·ic or hyp·no·gog·ic (hĭp'nə-gŏj'ĭk, -gō'jĭk)adj.
Inducing sleep; soporific.
Of or relating to the state of drowsiness preceding sleep.
Relating to the images or hallucinations sometimes perceived during this state.