We’ve all been there. You’re nestled comfortably in bed, beginning to fall asleep.

The dream reel starts spinning. Then, suddenly, you jerk awake. You shoot up in bed, gasping for breath.

[lz_ndn video=29860004]

“I’m almost asleep, and then I jump all of a sudden,” said Lindsey Abshire, a 27-year-old Baton Rouge resident who suffers from the occurrence. “I wake up briefly in a panic.”

Called the hypnic myocolonus — or, more colloquially, the hypnic jerk — the experience can be terrifying. But it’s also universal, and mostly harmless.

Related: Sleepy Time Sips

“In my mind, it’s like hiccups,” Dr. Carl Bazil, director of the Epilepsy and Sleep Division of the Department of Neurology at Columbia University, told LifeZette. “It happens to everyone, but because it’s nothing to worry about, it hasn’t been heavily researched.”

What we do know is that it happens “in the transition between sleep and wakefulness,” when many of our functions begin shutting out external stimuli, he said. The muscles relax, preparing for a self-induced paralysis, and the mind begins shutting down many aspects of conscious thought.

“Usually people smoothly go into sleep,” Bazil said. “Sometimes, though, there can be hiccups, such as the hypnic jerk.”

The mind, for whatever reason, decides that sleep isn’t the safest path at the moment and causes a muscle twitch to jerk you awake.

Related: Sleeping Under the Stars

Who do you think would win the Presidency?

By completing the poll, you agree to receive emails from LifeZette, occasional offers from our partners and that you've read and agree to our privacy policy and legal statement.

“It usually happens when it’s raining or there’s another noise outside, but it always startles me out of my sleep,” Abshire said. “I’ll wake up out of breath and have to spend a couple of minutes convincing myself everything is OK before I can fall back asleep.”

Cut out the caffeine and chocolate several hours before sleep.

Bazil said there is uncertainty why this happens, but there are a few theories.

One seems intuitive. We’ve all seen someone nodding off in a meeting, only to jerk his or her head back up. This is what “nodding” refers to.

Bazil said a standing or sitting person wouldn’t want his or her muscles relaxed because that could lead to a fall or other type of injury.

“Your body jerks you awake so you won’t injure yourself,” he said.

While researchers aren’t 100 percent certain what causes the jerking, it’s clear the reflexes are more likely to occur if you’re sleep deprived or have consumed stimulants, generally caffeine or chocolate.

Bazil suggests cutting caffeine and chocolate several hours before sleep.

“Noon is not too early, especially if you think it’s affecting your sleep,” he said.

In addition, be sure to get the proper amount of sleep per night — about seven to eight hours.

Related: You Snore? Don’t Ignore

Aside from hypnic jerks, sleep depreciation and stimulants can cause sleep paralysis and hypnic hallucinations. The former occurs in REM sleep, and refers to the conscious part of the brain waking up while the muscles are still paralyzed. The latter refers to visual and auditory hallucinations, which stem from dreams, while waking up and falling asleep.

This writer spent years battling sleep paralysis. A combination of not enough sleep and too much stress kept my mind active, and I would wake up, only I couldn’t move. The experience is terrifying, but following the advice of doctors like Bazil — exercising and sleeping more — and it’s become a rare occurrence.

These experiences aren’t dangerous, but if they’re interfering too much with your sleep — Bazil said he’s seen a few cases like this — then be sure to seek help.

Otherwise, cut the coffee, hit the hay, and sleep like a baby.