When my daughter was little, she was quite the sleepwalker. Until you have a sleepwalker in the family, you have no idea how terrifying it can be. You worry about whether they’ll safely navigate the stairs when they decide to sleep-stumble from the second-floor bedroom where they’re supposed to be, well, sleeping, to the first-floor family room where you’re watching TV. Or that they’ll open a door and wander outside in the middle of the night — and that you might not hear them leave. Or that they’ll pick up a knife in the kitchen or light a burner. . . . Let’s just say it’s hard to sleep with a sleepwalker around.

And if you have ever tried to talk to a sleepwalking child, you know how worrying it is to see how completely out of it they seem.

My son never walked in his sleep, and my daughter finally outgrew the behavior, which affects up to 30 percent of children, according to the introduction to a study published Monday afternoon in the journal Neurology.

The new research set out to determine how common sleepwalking is among adults. According to the report, the phenomenon has been little studied, so data about its prevalence are quite limited. The best estimate before this new study was that between 2 and 3 percent of adults walk in their sleep; the new research puts the number of adults who have walked in their sleep at least once in the past year at 3.6 percent. And 29.2 percent of those surveyed reported having walked in their sleep at least once in their life.

Lead author Maurice Ohayon of Stanford University and colleagues asked more than 15,000 adults about whether they walked in their sleep and, if they did, how often. They also asked whether others in their family had histories of sleepwalking or about other sleep habits, overall health, mental-health issues and any medications they took.

Among the key findings: People with obsessive compulsive disorder were four times as likely to sleepwalk, and those with depression 3.5 times as likely to do so, as people who didn’t have either condition. Use of selective serotonin re-uptake inhibitor (SSRI) antidepressant medications and over-the-counter sleeping pills also increased the likelihood of having sleepwalked.

The study also found that 25 percent of adults who had not walked in their sleep during the past year had done so as children or adolescents.