If you think it’s impossible to have sex while you sleep, think again, according to a new study.

There are at least 11 different sex-related sleep disorders, collectively referred to as “sexsomnia” or “sleepsex,” that affect people who are otherwise psychologically healthy—causing them to unknowingly engage in various sexual activities during the night.

Carlos Schenck, a psychiatrist at the Minnesota Regional Sleep Disorders Center, and his colleagues have studied a number of behavioral disorders associated with sleep.

“Any basic instinct can come out in the context of sleep,” Schenck told LiveScience. “All sorts of things can happen.”

Recently, he and his colleagues turned their focus to sex-related sleep disorders. They conducted computerized medical literature searches for studies published between 1950 and 2006 related to sleep and sexual behavior and looked through a number of sleep medicine textbooks. They also analyzed data from a previously completed internet survey that had gathered data from 219 people, 92 percent of whom had experienced multiple “sexsomnia” episodes.

Among other things, they found that people—mostly men—sometimes masturbate, initiate sex with a partner and reach orgasm during sleep. They usually have no memory of these activities when they wake up, learning about them only if a partner or roommate tells them. Some of these activities can also have legal consequences, such as if someone initiates sex without a bed partner’s consent, noted Schenck.

People are at-risk for developing sex-related sleep disorders when they also tend to suffer from other sleep disorders—such as sleepwalking or sleep terrors, according to Schenck. “Sexsomnia doesn’t come out of nowhere,” he said. But “for whatever reason, sexual behaviors become part of the repertoire.”

While people might feel ashamed to learn from their partners that they are exhibiting these behaviors while they sleep, these disorders are not indicative of psychological problems, noted Schenck, whose recently published book, Sleep: The Mysteries, The Problems, and The Solutions, has a chapter devoted to sex-related problems. “Bizarre and inappropriate behavior during sleep does not necessarily reflect a daytime psychological problem.”

And “sexsomnia” disorders are easily treated with medication, he added.

If anything, people who become aware of their problem but don’t seek help put themselves at an even greater risk. “The longer you go with this problem without getting it treated, the more you can then develop a secondary psychological problem,” such as depression, said Schenck, whose study is published this week in the journal Sleep.