It's the middle of the night when you open your eyes from an uneasy sleep. Sensing an ominous presence in the room, you try to turn your head for a better look but you can't move. You open your mouth to scream but find your throat unresponsive. Gripped by a blinding fear, you struggle against an invisible force holding you down.
What sounds like a scene from a horror film is, in fact, a condition known as sleep paralysis. This phenomenon has taken on a paranormal dimension in various interpretations across cultures.
In East Asia, such attacks are known as "ghost oppression", building upon ancient Chinese belief that a person's soul is vulnerable to the influence of evil spirits during sleep.
The earliest Chinese dictionary, the Shou Wen Chieh Tzu, dating from the Eastern Han dynasty around AD30 to AD124, records for the first time the Chinese written character for ghost oppression, which combines the characters for oppression and ghost.
Sleep paralysis affects fewer than 8 per cent of the general population, although about 25 per cent of all people have probably experienced it at some point during their life. Fortunately, while it can be terrifying, sleep paralysis is not considered to be a dangerous or harmful medical condition.
Scientists now know that this condition is just one example of a sleep disorder - although the physiological mechanism behind sleep paralysis is still under active study. To begin to understand how these disorders have such frightening effects, it's important to know how the sleep cycle works.
Sleep can be divided into four stages during which your brain activity, heart rate and breathing rate slow down. Each stage proceeds in sequence from one to four, then reverses through stages three and two; this cycle takes about 90 minutes.
Following this, the body enters a stage known as rapid eye movement (REM) sleep, named because of the characteristic eye-flickering that happens during this stage.
A normal sleep pattern is thus organised: awake, stage 1, 2, 3, 4, 3, 2, REM.
The first REM period lasts about 10 minutes, after which the whole sleep cycle repeats. Subsequent REM stages gradually lengthen, with the final one lasting an hour. REM sleep is when most vivid dreams occur that people can recall. Your heartbeat may increase during this stage and muscles may twitch occasionally.
During REM sleep, muscles that move the eyes, and those involved in breathing, continue to function, but most of the body's other muscles are stopped. Naturally reversible paralysis is a way to protect sleepers from injuring themselves by unconsciously acting out their dreams.
Two chemicals in the brain, GABA and glycine, which signal between brain cells, are responsible for switching off the neurons that allow the muscles to be active.
Sleep paralysis is a form of intrusion into REM sleep. If you wake up before a cycle of REM sleep is complete, your body might not regain regular function in sync with your mind. In normal sleepers, muscle control resumes before they become consciously awake.
But a mistimed disconnection between the brain and body can result in temporary paralysis while the person is mentally aware. The combination of dream and consciousness when awake can cause terrifying hallucinations.
People experience three types of hallucinations during sleep paralysis: the presence of an intruder, pressure on the chest, and levitation or out-of-body experiences.
The first, sensing an intruder, may be caused by the combination of lower sensory detection thresholds and high activity in the amygdala, the emotional centre of the brain. Breathing difficulty is due to paralysis of the muscles in the upper airways that causes feelings of choking and suffocation.
Lastly, out-of-body experiences are associated with structures in the brain known as vestibular nuclei that co-ordinate body movements. The feeling of viewing oneself from outside the body occurs because of a connection problem between brain activity and body control.
Interestingly, interviews with people who have had an out-of-body or a near-death experience, or both, indicate that the two phenomena are similar.
Dr Kevin Nelson from the University of Kentucky believes the brain's arousal system that regulates different states of consciousness such as REM sleep and wakefulness may be the cause of out-of-body displays. "The strong association of sleep paralysis with out-of-body experiences in the near-death experience subject is curious and unexplained," he says.
"However, people with near death experiences appear to have an arousal system predisposed to both REM intrusion and out-of-body experiences."
While sleep paralysis is considered relatively harmless, there are some associated sleep disorders that can be debilitating. For example, sleep paralysis is closely associated with narcolepsy, a neurological condition where a person falls asleep abruptly and uncontrollably in the daytime.
Narcolepsy also includes features of dreaming while awake. Instead of first going through the stages of non-REM sleep, the patient's brain enters directly into REM sleep. This causes the sudden bouts of unexpected sleep as well as temporary muscle weakness, another condition known as cataplexy.
A protein that regulates sleep and wakefulness, known as cerebrospinal fluid (CSF) hypocretin-1, is present in reduced levels in narcoleptic patients.
A person's immune system could have a large part to play in this disorder because many cases of narcolepsy involve antibodies produced by the body that target healthy cells in the brain responsible for producing hypocretin.
Known as an autoimmune disease, the body destroys its own cells leading to a deficiency in hypocretin and resulting in narcolepsy.
Managing the symptoms of sleep disorders is an important aspect of helping patients lead as close to a normal life as possible. More pertinently, REM sleep disorder can be an indicator of neurodegenerative diseases.
Dr John Peever from the University of Toronto believes that better treatments for sleep disorders can be developed by studying how the brain shuts down muscle movement during REM sleep.
"Understanding the precise mechanism behind these chemicals' role in REM sleep disorder is important because about 80 per cent of people who have it develop a neurodegenerative disease," he says. "Curing it may help prevent or even stop their development."
Dr Brian Sharpless of Penn State University agrees. "Sleep paralysis should be assessed more regularly to determine its impact on individual functioning and better articulate its relation to other psychiatric and medical conditions."