Sleepwalking is surprisingly common among Americans, with about 3.6% of U.S. adults — 8.5 million — rising in the wee hours of the night to wander around.

A disorder caused by arousal from non-REM sleep, sleepwalking is very common during childhood and tends to decrease with age. “It’s dangerous because it is quite a lot of people,” says lead researcher Dr. Maurice Ohayon, a professor of psychiatry and behavioral sciences at Stanford University School of Medicine. “Sleep walking is less dangerous if you are home and there is someone to take care of you. But if you’re alone or not in your home, you could hurt yourself. You could fall or do something inappropriate.”

The researchers looked at 15 states to select a representative sample of the general U.S. population. Using phone surveys, the team questioned 19,136 individuals about their sleep walking history, mental health, medical history and medication use. Participants were asked to report the frequency of sleepwalking episodes, the duration and any inappropriate or dangerous sleep behaviors. The researchers also asked about childhood sleepwalking and family history.

They found that about 3.6% of the participants reported a minimum of one sleepwalking episode in the last year and 1% of participants reported sleepwalking two or more times in a month. The percentage of people who have sleepwalked at least once in their lives was 29.2%.

Psychiatric disorders like depression and anxiety were also associated with sleepwalking. In the study, people with depression were 3.5 times more likely to sleepwalk than those without depression. Participants taking SSRI antidepressants were three times more likely to sleepwalk twice a month or more, although there was no significant link between sleeping pills and sleepwalking. People with alcohol addictions and obsessive-compulsive disorder were also more likely to sleepwalk.

“There is no doubt an association between nocturnal wanderings and certain conditions, but we don’t know the direction of the causality,” Ohayon said in a statement. “Are the medical conditions provoking sleepwalking or is it vice versa? Or perhaps it’s the treatment that is responsible.”

The study was published in the American Academy of Neurology medical journal Neurology.