During normal sleep cycles, we progress through stages of non-rapid eye movement (NREM) sleep and eventually into rapid eye movement (REM) sleep. When we enter REM sleep, we are more likely to dream, most muscles in the body become paralyzed, and our eyes move back and forth behind the eyelids.
For a person with narcolepsy, aspects of REM sleep overlap with being awake. This is why during the day, when the person is awake, a strong emotion can trigger cataplexy and the paralysis of REM, causing the loss of muscle control seen in cataplexy. This is also what causes a person with narcolepsy to experience vivid dream-like hallucinations and paralysis while falling asleep or waking up.