I woke up from a dream one morning when I was in my early 20s, and on my ceiling I saw an impossibly huge spider crawling toward me. I would have screamed or jumped out of bed if my body hadn't been completely paralyzed.
After a few moments, I could wiggle my extremities. The 2-foot-wide spider disappeared.
Despite how bizarre this sounds, I wasn't having a mental collapse when this happened to me many years ago. It was sleep paralysis -- freezing me in place and confronting me with a terrifying hallucination -- and my neurologist said it wasn't a big deal.
Sleep paralysis usually occurs when you wake up lying on your back, while your body is still immobilized from the dream phase of sleeping. You can't move a muscle, for anywhere from a few seconds to several minutes.
Some people also hallucinate, sensing someone or something evil in the bedroom. While the hallucinations vary, many people have seen an intruder in the room or felt someone pressing down on them in bed with striking consistency across cultures and time periods.
In medieval Europe, people believed in incubi, or evil demons that lay on people in their sleep. The Japanese term for sleep paralysis is kanashibari, meaning bound up. And my personal favorite, a concept from Hong Kong, is called "ghost oppression."
According to sleep research, about 8% of people experience sleep paralysis, although individual studies have placed the number anywhere from 5% to 62%. Some people experience sleep paralysis as frequently as every week, and others only occasionally.
Since sleep paralysis on its own doesn't get in the way of leading a healthy, happy life, it's just one more strange thing the human brain can do, said Rafael Pelayo, a professor of psychiatry and behavioral sciences at the Stanford Center for Sleep Sciences and Medicine.
If your sleeping brain is like an orchestra, Pelayo said, then sleep paralysis is like the conductor waving the baton to stop the music -- but one person misses the cue and keeps playing.
"It seems to be a natural behavior occurring," Pelayo said, "just at the wrong time."
You're supposed to experience paralysis while you sleep. Known as sleep atonia, the paralysis keeps you still during REM sleep, the phase associated with dreaming.
"You don't want to be acting out your dreams at night," said Marri Horvat, a doctor at the sleep disorders center at the Cleveland Clinic. "It's a good thing to be paralyzed at that time."
In fact, people with REM sleep behavior disorder face the opposite of sleep paralysis, moving and often risking injury while dreaming.
During sleep atonia, the body releases two chemicals to keep you still: gamma-aminobutyric acid, also called GABA, and glycine. Sleep paralysis appears to occur when you're entering or exiting REM sleep, and if things don't line up right, you'll still be flooded with those sleep chemicals when you gain consciousness.
Sometimes that's accompanied by the visual side of REM sleep, otherwise known as dreams, which prompts an experience that feels like a hallucination.
Having sleep paralysis doesn't point to any specific health conditions, and there's no formula to predict who might experience it. The most common factors appear to be sleep deprivation and sudden shifts in the sleep schedule.
A slew of other factors may also be at play. A meta-analysis of sleep paralysis studies found indications that non-white people experience sleep paralysis more frequently than white people, and problems like substance abuse, anxiety and PTSD also increase the odds. Still, findings about these characteristics weren't always replicated in other studies, the meta-analysis found. While sleep paralysis can be associated with narcolepsy, it often happens to people without the disorder.
If you're struggling with things like addiction, stress or trauma at the time you have a sleep paralysis hallucination, it's as good a time as any to get treatment for those problems. But these specific hallucinations aren't linked to more serious disorders like schizophrenia, psychosis or brain tumors.
Sleep paralysis and schizophrenia can both emerge in early adulthood, but a telling difference is that someone with sleep paralysis usually knows soon after fully waking that they experienced a hallucination, said Stanford sleep doctor Pelayo. Someone with schizophrenia might have a harder time distinguishing what's real.
The best way to treat sleep paralysis is to get more and better sleep, Pelayo said. If the problem comes up a lot, Pelayo suggested seeing a doctor to find out whether sleep apnea or anxiety-filled dreams caused by PTSD are disrupting your sleep, making you more prone to a jarring spell of paralysis.
"The most natural form of care we have for the brain is sleeping," Pelayo said. "Anything that's going wrong for the brain is made worse by not getting enough sleep."
For me, the worst part of sleep paralysis was not knowing what it was. Even if you know it's not real, it's hard not to stress about hallucinating a giant arachnid.
Once I got a medical explanation, sleep paralysis became nothing more than an odd experience that pops up occasionally during stressful times.
Thankfully, that spider never came back to haunt my waking dreams.