Charles, a 26-year-old tech expert from North Carolina, is sexually active. He has sex with his girlfriend about three times a week—but that's only counting when he's awake. A handful of times a month he'll go for it in his sleep. He gets rough. "You know how on National Geographic when an animal sneaks up behind a female and jumps on and pumps away? That's me," says Charles, a soft-spoken guy in waking life. And it's not like he even gets to enjoy it: Charles wakes up with no memory at all of having had sex.

Charles thinks he suffers from what's called sexsomnia, a kind of X-rated version of sleepwalking. Instead of bumping into walls or tripping over furniture, sexsomniacs have sex, all kinds of sex, while they're sound asleep. For men like Charles, the agonizing challenge of sexsomnia is keeping Dr. Jekyll and Mr. Hyde in balance. When a guy suddenly becomes aggressive—or even uncharacteristically tender—during sexsomnia, it can mess with his head as well as his partner's. Which one is the real him?

Also known as sleepsex, sexsomnia is officially defined as sexual behavior driven by abnormal arousal during deep sleep. But not even many doctors are familiar with it, since sexsomnia wasn't recognized by the American Academy of Sleep Medicine until last year. "Although nobody has published data specifically about sex-related sleep disorders, we tend to see similar disorders—sleepwalking, confused arousals, things like that—happening in about 4 percent of the population," says Michael Mangan, a psychologist at the University of New Hampshire. "So this is something that could be affecting millions." What researchers do know is that men account for most of the reported cases of sexsomnia, and that the condition is especially prevalent in those under 35. It is thought to be rooted in genetics, but controllable factors like sleep deprivation, stress, and drug or alcohol use can also play a role. The problem can be treated by anti-anxiety drugs such as Klonopin, though there are blunter, cheaper fixes as well—such as a wife's hard slap to the face.

Mangan is one of the few academics conducting research on the condition. After collecting dozens of case studies from sexsomniac men and women across the country, he found that many couples consider sexsomnia a harmless, kinky surprise. But it can end relationships, or worse. "People are ashamed or embarrassed or confused," Mangan says. "And the next thing they know, they're in court because they didn't do anything to address it." Sexsomnia is finally popping up on the clinical radar, thanks in part to a number of recent sexual-assault trials. This winter in England, a 22-year-old man was acquitted of raping a friend after his defense team, with the help of testimony from sleep experts, convinced the jury that he was a sexsomniac. Indeed, in the handful of rape or molestation trials where sleepsex was used as a defense, the men on trial were often acquitted.

But not always. Last May, Richard Anderson, a 34-year-old from Chelmsford, Massachusetts, got three years' probation for fondling two girls, ages 11 and 13, even though the mother of the girls believed he suffered from sexsomnia—and even though just three years earlier a supposed sexsomniac had been cleared in a Massachusetts trial. In that case, Adam Kieczykowski, a 19-year-old Massachusetts Maritime Academy student, was charged with breaking into dorm rooms at the University of Massachusetts at Amherst and sexually assaulting 10 women. If it happened, he claimed, he must have been sleepwalking. He didn't remember a thing when he woke up the next morning. In such trials evidence of sexsomnia can be provided by a history of sleep trouble, brain-wave patterns, testimony from former sex partners, and a general personality evaluation showing that, for these guys, sexual indiscretion is a matter of accident, not opportunity.

But proving that someone was asleep while they performed a specific act is difficult—sometimes even for the person who performed it. "Memory, even when you're awake, is a very complicated thing," says Christian Guilleminault, director of Stanford University's Sleep Medicine Program. "There are a lot of things about your day that you don't remember. Sleep is a lot more difficult. A large and growing percentage of the American population is sleep-deprived, which affects memories of behaviors during and before sleep." Dr. Guilleminault compares sexsomnia to a much more common problem: "A lot of people drive when they're tired or asleep, and then they realize they have been driving for 15 minutes without any memory of it. It's an automatic behavior taking over."

Even as sexsomnia gains steam in sleep-science research, it still lacks wider recognition among other academics such as psychologists and psychiatrists (who are often the folks sexsomniacs first turn to for help). Mark R. Pressman, director of sleep-medicine services at Lankenau & Paoli Hospitals in suburban Philadelphia, has seen a handful of cases he considers authentic in his 25-year career. Nevertheless, he believes that some defendants claim to have sexsomnia as a last-ditch effort to prove their innocence. "Sometimes it's just the only defense people can think up" for sexual assault, he says. "That's true of other desperate defenses. How many times have you heard of someone actually having temporary insanity?"

Which might explain why most who claim to be sexsomniacs are initially greeted with skepticism. "I've explained it to some girls," says Charles, "and they say they understand, but I get the feeling they still think I'm a perv. Like, I just use this bullshit 'condition' as an excuse for my dark and dirty turn-ons." The fact is, it will take a lot more studies like the one now being done at the University of New Hampshire before therapists and counselors can definitively separate the sex maniacs from the sexsomniacs. "In the end, you can never really be sure," says UNH's Mangan. "You can only ascertain probability."

And yet, some men find sexsomnia to be a boon to their sex lives. "Jay," a 28-year-old from Milwaukee, discovered his girlfriend was a sexsomniac when he awoke one night to find her giving him oral sex in her sleep. Now every few months it'll happen regularly for a week or so, which suits Jay fine. As he points out, "Why not mess around whenever you can?"

READ MORE:
Why Men Should Fear the Rape Fantasy
How to Get a Good Night's Sleep
3D Porn: Up Close and a Little Too Personal