Henry Fuseli's "The Nightmare" may have been inspired by the chest-crushing sensation and hallucinations of sleep paralysis.

People who've experienced the strange phenomenon of sleep paralysis may feel like they can't move their body when they're falling asleep or waking up, or may have hallucinations that there's a malevolent presence pressing down on them. Now, a new study suggests the phenomenon may have a heritable cause.

In the study, researchers asked a group of more than 800 twins and siblings whether they had experienced sleep paralysis. The results showed that genetics were partially to blame for the strange phenomenon.

In addition, the people in the study who had anxiety, slept poorly or had experienced stress in their lives were more likely to have these nighttime bouts of paralysis, the researchers found.

The findings shed some light on what is still quite a mysterious condition, the researchers said.

"The cause is still unknown, but we think it's something to do with disruption of the regular sleep cycle," said Daniel Denis, a psychologist at the University of Sheffield in England, and co-author of the study published online Feb. 9 in the Journal of Sleep Research. [Top 10 Spooky Sleep Disorders]

Waking nightmare

Sleep paralysis often occurs during the rapid eye movement (REM) stage of sleep, when people are usually dreaming. In REM, the muscles are nearly paralyzed — possibly to prevent people from acting out their dreams, scientists say. Some people who suffer from sleep paralysis experience hallucinations of a terrifying figure pressing down on them and preventing them from moving.

Estimates of how many people experience the phenomenon vary widely. Some studies have found that just over 7 percent of people will experience the feeling at some point in their lives, whereas other studies suggest as many as 60 percent of people will.

"It's more common than you would actually expect," Denis told live Science. Yet scientists don't really know what causes the phenomenon, or whether it is heritable.

To find out, Denis and his colleagues used data from 862 twins (identical and nonidentical) and other (non-twin) siblings between ages 22 and 32 in England and Wales. The participants indicated on the survey whether they agreed with the statement, "Sometimes, when falling asleep or waking up from sleep, I experience a brief period during which I feel I am unable to move, even though I think I am awake and conscious of my surroundings." [Sleep Paralysis: Spooky Art Images]

By comparing the responses of identical twins, who share almost all of their DNA, with those of nonidentical twins or siblings, who share about half of their DNA, the researchers found that genes accounted for more than 50 percent of the incidence of sleep paralysis.

They also found that sleep paralysis was more common in people with anxiety, those who weren't getting good sleep and those who had had traumatic experiences, such as an illness or death in the family.

Sleep/wake cycles

Next, the researchers looked at individual genes that could be involved in sleep paralysis, which had not been done before, Denis said. The researchers looked to see which version of a gene called PER2 — which is linked to daily cycles of wakefulness called circadian rhythms — the people in the study had. They found that the people who had certain versions of this gene were more likely to have sleep paralysis.

"It's still a preliminary finding," Denis said, but added that it provides "a general inkling that something to do with the control of circadian rhythms is probably involved in sleep paralysis."

The study has a number of limitations. For a behavioral genetics study, it was based on a relatively small number of participants, and was limited to young adults. In addition, the findings don't prove that genetics or stressful factors cause the paralyzing experience, only that the two are linked.

"It’s a chicken-and-egg thing," Denis said. For example, having anxiety could cause a person to experience sleep paralysis, or it could be that experiencing sleep paralysis could make a person more anxious, he said.

"The main thing we've learned is [sleep paralysis] appears to be heritable, and there seem to be some genes influencing sleep and wake patterns involved," Denis said.

Follow Tanya Lewis on Twitter. Follow us @livescience, Facebook & Google+. Original article on Live Science.