Relating to the process of waking up from sleep.
In a hypnopompic experience it is possible for the dream state to overlap with the real perceptions. The dream fades off and reality kicks in, but only the brief overlap is called a hallucination.
The experience has similarities with a mild LSD trip, and can sometimes be (mis)interpreted as a flashback. From a chemical point of view this is not surprising, for the serotonin receptors of the brain play a key part in both.
Hypnopompic/hypnagogic states are not always limited to bedtime and waking up, especially for people with sleeping disorders. This is one more reason to believe that tripping flashbacks are not due to residues of the chemical left in the body; the brain has an amazing capacity to recreate its biochemical state even without external help.