What's going on? You've experienced a common sleep disturbance known as a hypnic jerk. (The same thing is sometimes called a hypnagogic jerk or a sleep start, and they don't always wake people up.)
"Nobody knows for sure what causes them," explains psychologist Tom Stafford at BBC Future, "but to me they represent the side effects of a hidden battle for control in the brain that happens each night on the cusp between wakefulness and dreams."
In other words, when the effects of sleep are just beginning to take over your body and brain, your waking self seems to creep back in unexpectedly sometimes, startling you awake. Boo.
What We Know About Hypnic Jerks
Hypnic jerks are involuntary muscle twitches known as myoclonus. Hiccups also fall into this category.
These momentarily alarming sleep disturbances are a bit of a mystery. But there are some theories about why we experience them.
One is this aforementioned idea that there's a kind of sleep-wake wrestling match in your brain. "As sleep paralysis sets in, remaining daytime energy kindles and bursts out in seemingly random movements," Stafford writes. "Hypnic jerks are the last gasps of normal daytime motor control."
Another theory is evolutionary, stretching back to our primate ancestors. Frederick Coolidge, a psychologist at the University of Colorado, has suggested that a hypnic jerk could be "an archaic reflex to the brain's misinterpreting the muscle relaxation accompanying the onset of sleep as a signal that the sleeping primate is falling out of a tree. The reflex may also have had selective value by having the sleeper readjust or review his or her sleeping position in a nest or on a branch in order to assure that a fall did not occur."
There's no evidence to support either of these theories, and research on the subject is scant. Sleep starts are common and harmless, and unlikely to shoot to the top of anyone's research agenda anytime soon.
But scientists have observed that hypnic jerks are associated with a rapid heartbeat, quickened breathing, sweat, and sometimes "a peculiar sensory feeling of 'shock' or 'falling into the void.'"
They are "benign," a study in the journal Sleep Medicine notes, and frequently occur in people who are perfectly healthy. They are sometimes, though not always, "triggered by fatigue, stress, sleep deprivation, vigorous exercise, and stimulants like caffeine and nicotine."
If you experience them constantly, or enough that you have developed anxiety or insomnia, you should talk to a doctor. But for most of the 70% of people who experience them, hypnic jerks are a moment of harmless fright and nothing more. Take some deep breaths, relax, and try to go to back to sleep.
If a patient is worried about their hypnic jerks, one review in the journal Chest notes, "reassurance that this is a normal phenomenon is all that is needed."