A study in Tuesday’s issue of Neurology revealed something surprising about American nighttime habits—we like to walk. The first-ever large-scale survey of sleepwalking habits in American adults indicated that an estimated 3.6 percent of us—more than 8.4 million people—have had an episode of nocturnal wandering in the past year. This is much higher than researchers expected. Nearly 30 percent of respondents reported sleepwalking at some point in their lives.

“The study underscores the fact that sleepwalking is much more prevalent in adults than previously appreciated,” the researchers, led by Maurice Ohayon of Stanford University, noted in the study. “The numbers are very big.” For comparison, the sleep disorder narcolepsy affects an estimated .04 percent of the population.

Sleepwalking can take a number of forms, from brief periods of wandering to activities as complicated as cooking, cleaning and even driving a car. In 2004, an Australia woman reportedly had repeated sex with strangers over the course of several months while sleepwalking, and in rare instances, it has been used as a defense in trials for homicide and other crimes.

Despite the surprising prevalence of this phenomenon, though, scientists still don’t understand what causes it.

The American Academy of Sleep Medicine divides our sleep time into two categories—REM sleep and non-REM (NREM) sleep, depending on whether REM (rapid eye movement) is occurring underneath the eyelids. During REM sleep, the brain’s neuronal activity is most similar to when it is awake, and that’s when we do most of our most vivid dreaming.

Paradoxically, though, sleepwalking occurs during NREM sleep. Normally, adults go through sleep cycles: from the lightest stages of NREM to the deepest NREM, and then back to the lightest NREM and then REM, every one and a half hours or so. Sleepwalking typically occurs during the deepest stages of NREM—the part of the sleep cycle that, if interrupted, leaves you the most groggy. It usually happens during the first third of the night and can last anywhere from 30 seconds to 30 minutes. Some scientists speculate that it is caused by the brain attempting to directly transition from deep NREM sleep to wakefulness, rather than going through the subsequent stages of the sleep cycle.

One factor that seems to increase the likelihood of sleepwalking is simply the amount of time people spend in this deepest stage of sleep. Sleep deprivation, fever and excessive tiredness can increase the odds that an individual will sleepwalk. Additionally, over-the-counter sleeping pills and SSRI (selective serotonin reuptake inhibitor) medications, commonly prescribed to treat depression, are known to increase the duration of deep sleep.

Thus, it’s not entirely surprising that the Neurology study found that sleepwalking is positively correlated with a number of mental disorders, such as clinical depression, alcoholism and obsessive-compulsive disorder. People who take SSRIs or sleeping pills are much more likely to sleepwalk at least twice a month than those who don’t.

“There is no doubt an association between nocturnal wanderings and certain conditions,” said Ohayon of the survey’s results, which sampled 19,136 individuals from 15 states. “But we don’t know the direction of the causality. Are the medical conditions provoking sleepwalking, or is it vice versa? Or perhaps it’s the treatment that is responsible.”

Overall, children sleepwalk far more often than adults, and the phenomenon is not strongly associated with a particular gender. The study found that most sleepwalkers experience the phenomenon chronically, as 80 percent who reported sleepwalking had done so for more than five years. Additionally, 30 percent had a family history of sleepwalking.

Experts disagree about what you should do if you see someone sleepwalking. While it may be amusing, it can often be dangerous, but some believe that suddenly waking the sleeper can cause excessive disturbance.

“Make sure they are safe. If at all possible, gently try to steer them toward their bed. If they resist, let them be,” neurologist Gayatri Devi told WebMD. “Make sure there is a lock on the door and the window,” Ohayon says. “They don’t realize what they are doing.”

Like this article?SIGN UP for our newsletter

About Joseph Stromberg

Joseph Stromberg is a science reporter for Vox.com. He was previously a digital reporter for Smithsonian.