Have you ever woken up and thought there was a ghost or ghoulish creature in your room? Have you ever tried to move, but you were paralyzed in your sleep? You aren't alone. According to Live Science, about 40 percent of people experience sleep paralysis some time during their lives.

"Sleep paralysis can be a very frightening experience for some people, and a clear understanding of what actually causes it would have great implications for people who suffer from it," Baland Jalal, a neuroscientist at the University of California, San Diego, told Live Science.

When your body reached REM (rapid eye movement stage of sleep), you are dreaming and your muscles are "paralyzed." (Scientists believe that the body has evolved to keep sleepers from acting out their dreams). Those who experience sleep paralysis awaken while in the dream state, according to Live Science.

Science isn't certain why a subdivision of people who have sleep paralysis sense a monster in their room or feel like something is sitting on their chests.

A recent article published in the journal Medical Hypotheses by Jalal and Vilayanur Ramachandran hypothesizes that hallucinating is the brains way of sorting the confusing information. "Perhaps, in part of the brain, there's a genetically hardwired image of the body - a template," Jalal told Live Science. If neurons are firing but the body can't move, the brain could get confused about its sense of body and the brain could be projecting that image of a person in the room.

Jalal told Live Science that the idea would be hard to test, but he thinks that people with different body images could help. For example, if someone is missing a limb and they hallucinated a figure that is also missing a limb, Jalal's hypothesis could be supported.

Sleep paralysis and the ghosts seen or felt could be related to culture, Jalal said. Jalal and Devon Hinton, of Harvard Medical School, conducted a study that was published in 2013 in the journal Cultural, Medicine, and Psychiatry. The researchers compared sleep paralysis sufferers in Egypt and Denmark. "These are two very different cultures; Egypt is very religious, whereas Denmark is one of the most atheist countries in the world," Jalal told Live Science.

The study showed that Egyptians had more frequent sleep paralysis, longer episodes and a greater fear of death during the episodes than the Danish did. The Danes blamed psychological reasons or poor sleep habits for their sleep paralysis, according to Live Science, but the Egyptians held the supernatural responsible.

Another study, published in 2014 in the journal Transcultural Psychiatry, stated that half of the Egyptian study subjects blamed jinn - an ominous phantom from Islamic mythology - for their experiences, according to Live Science.

"If you have fear, the activation in fear centers in the brain might mean more likelihood of fully awaking during sleep paralysis, and experiencing the whole thing," Jalal told Live Science. "And by experiencing it, you would have more fear - and then, you have all these cultural ideas of what it is added as well, and now you are even more scared of it."