Hypnagogic and hypnopompic phenomena are vivid auditory or visual illusions or hallucinations that occur when just falling asleep (hypnagogic) or, less often, immediately after awakening (hypnopompic).