There are written accounts from ancient cultures of sleepers reporting the feeling that someone was lying on their chest, as if they were being choked. Eventually, people came up with an Olde English word to describe it–maere, which refers to a female evil spirit that lies on top of sleepers and suffocates them. Given that it always came at a certain time of day, they combined it into a new word: Nightmare.
Since then, of course, modern medicine has provided more clarity.
Sleep paralysis is associated with the period of sleep known as rapid eye movement, or REM. This is the stage of sleep in which the majority of dreaming occurs. Episodes of paralysis happen most commonly as people are coming out of REM sleep and beginning to wake up, but they can also happen as people are just beginning their REM cycle. Your eyes open and your mind wakes up, but your body remains asleep.
“In most cases, this occurs in people who are sleep deprived or have irregular sleep patterns,” says Charles R. Cantor, a professor of clinical neurology who sees patients at the Penn Sleep Center. “It can also occur in patients who suffer from narcolepsy, and those patients often experience it going into REM sleep as well as waking up.”
Brief hallucinations can happen as a person wakes up from REM sleep, Cantor explains. “When this happens you are in a mixed state of being partly awake and partly asleep. Your hallucination may incorporate something present in the room but misinterpret it.”
In other words, the brain is working against itself. While someone’s eyes are open, their body can’t move, and their brain needs to come up with some kind of explanation for that. Since it’s coming out of the dream space, these hallucinations are not bound by logic, so often the brain reaches for the most supernatural reasoning.
Source: University of Pennsylvania