Zombies rising from the dead are still very much confined to science fiction, but sleepwalking has to be its closest analog: Each night, a portion of us semi-awakens, as if pulled by some otherworldly strings, and performs absurd acts that register the following morning as total mysteries.

Scientists have tried to explain the phenomenon of sleepwalking, but the best we can do is figure out what’s going on; the reasons behind it still elude even the savviest of sleep researchers. Believe it or not, nearly 30 percent of all adults have sleepwalked in their lives. It’s so common, in fact, that science has even cooked up a fancy name for sleepwalking, or somnambulism as the academics call it.

The Light’s On, But…

At once, it’s both silly and serious. Sleepwalking is no doubt the most curious and striking of the sleep disorders. Sleep apnea is boring, and annoyingly lethal if untreated. Insomnia is downright morose. But sleepwalking has the element of surprise built in. Nighttime antics range from aimless wandering to unconscious cooking. There’s also the overzealous sleepwalker who decides driving a car and murdering people (sometimes forgiven under the pretense of insane automatism) are worthwhile pursuits.

Putting aside the innumerable court cases and wrecked Toyotas, the reason this behavior is so common has to do with the mental state of the sleepwalker. When we sleep, our brains slip into a number of stages, which cycle over the course of the night. The first four stages are divided into light sleep, consolidated sleep, and two stages of slow wave sleep periods. Together these are known as non-rapid eye movement (NREM) phases. After that comes REM sleep, the rapid eye movement phase. Each cycle lasts about an hour and a half.

Sleepwalking happens at the tail end of the NREM phases, when your body has fallen into a semi-conscious state. Formally, the brain’s delta waves are their most active. Delta waves are the slowest waves yet have the greatest amplitude, which contributes to the depth of sleep yet retained ability to be physically active.

Why certain people’s brains make the transition from high delta wave frequency to sleepwalking, and not simply continued sleep, is something of a mystery. But scientists speculate the behavior likely has roots in poor maturation during childhood. Neurologist Antonio Oliviero, of the National Hospital for Paraplegics in Toledo, Spain, believes from his research that faulty wiring related to the neurotransmitter GABA (gamma-aminobutyric acid) could be the underlying mechanism.

“In children the neurons that release this neurotransmitter are still developing and have not yet fully established a network of connections to keep motor activity under control,” Oliviero explained in Scientific American. Because GABA suppresses the brain’s motor control signals, a shortage of the substance could lead to a sleepy child whose dreams get turned into reality. “In some, this inhibitory system may remain underdeveloped — or be rendered less effective by environmental factors — and sleepwalking can persist into adulthood.”

It also (no pun intended) runs in the family. If one parent is a sleepwalker, the child has a 45 percent chance of becoming one. If both parents are, the chances jump to 60 percent. Depressed people are three times more likely to sleepwalk, not to mention migraine sufferers and people with Tourette syndrome who are four to six times more likely to sleepwalk.

Staying Asleep (In Bed)

Treatment for chronic sleepwalking is typically found in drugs like benzodiazepines, psychoactive drugs that slow the body’s processes via GABA enhancement. These have been met with mixed success. Alternate modes of treatment include maintaining good sleep hygiene and keeping a regular schedule, free from sleep deprivation.

And to settle the score once and for all: Waking a sleepwalker will not kill them. “You can startle sleepwalkers, and they can be very disoriented when you wake them up and they can have violent, or confused reactions,” said Michael Salemi, general manager at the California Center for Sleep Disorders, to Scientific American, “but I have not heard of a documented case of someone dying from being woken up."