Ever wake up in the shower and wonder how you got there or been tracked down by your spouse as you're watering the plants in your sleep? You're not alone: Nearly a third of American adults have sleepwalked at least once in their lives, and about 3.6 percent of adults—about 8.5 million Americans—sleepwalk at least once a year, according to a new study by researchers at Stanford University.

That's a much higher number than previous estimates, says Maurice Ohayon, lead author of the report. A study 10 years ago of European populations found that about 2 percent of adults sleepwalk per year.

"To put that in perspective, think of a disorder everyone knows—narcolepsy. The prevalence of that is about .04 percent," he says. "I think not enough people are aware of the risks of sleepwalking."

Those risks can range from the banal—bumps and bruises, sleepiness, and small accidents—to the spectacular—accused criminals have been acquitted of rape and murder committed while sleepwalking.

In a 2010 study of European subjects, Ohayon found that about 1.6 percent of people behave violently in their sleep—about a third of those people had hurt themselves or others during the episodes. Some had even reported committing unwanted sexual misconduct during their sleep.

For the first time, Ohayon and his team have been able to suggest potential disorders that can cause or are at least associated with sleepwalking, including a potential genetic link, alcohol abuse, over-the-counter sleeping pill use, major depressive disorder, and more.

About 30 percent of sleepwalkers have family members who also sleepwalk, suggesting there may be a genetic component. People who get less than seven hours of sleep nightly are more likely to sleepwalk than those who get more sleep. People who have a disorder involving their circadian rhythm, or internal clocks, are four times as likely as the general population to sleepwalk, while insomniacs are about twice as likely.

People who abuse alcohol and people with major depressive disorder are about three times as likely as the general population to sleepwalk, while people with obsessive-compulsive disorder are more than seven times as likely to sleepwalk.

Four out of five sleepwalkers reported having had the condition for at least five years. Ohayon found no racial component, though people between the ages of 18 and 44 were more likely to sleepwalk than older participants.

Sleepwalking is generally considered more prevalent among adolescents, with some studies showing that as many as 30 percent of children sleepwalk at least once a year. Ohayon's study, which looked at a representative sample of 20,000 adults in 15 states, is the first of American adults since the late 1970s, when about 2.5 percent of adults were found to be sleepwalkers. Since that time, the use of antidepressant medications and sleeping pills has increased, which could have led to more sleepwalking adults.

While most cases of sleepwalking or "nocturnal wandering" are essentially harmless, Ohayon says it becomes much more dangerous when staying at a hotel, a friend's house, or other unfamiliar place.

"As long as the sleepwalking is happening in your home, you know where your furniture is, you'll have your family around so they can prevent you from having a big accident," he says. "Sure, there's the small amount of people that have big accidents, but when something like that is happening to you, it's a big problem."

Besides giving clues for what triggers sleepwalking, Ohayon says the study may shed light on possible treatments or behaviors that can be modified if sleepwalking becomes a severe problem.

"I think everyone who is sleepwalking is taking a chance—the more it happens, the more risk there is. If these people must be treated, we know what the triggers are," he says. "We can tell them to avoid using this medication, avoid using these substances. There's a lot of things that can help."