Others worry they’ll be labeled with a mental illness, a notion that mental health experts now dismiss. “Those who exhibit violence during sleep, or scream, or swear, or masturbate, or eat frozen ravioli, or wander into the hallway in their underwear while asleep generally have no more of a psychological disorder than those who sleep peacefully every night,” Dr. Schenck writes in his book “Sleep: The Mysteries, the Problems and the Solutions” (Penguin/Avery, 2007).

“I thought this was just the way I was,” said Sarah Tracey, a 22-year-old radiation therapist and sleep eater from Canton, Mass. “I usually get up four or five times a night. I’ve been doing it since I was 11 or 12-ish.” When she worried that her disturbed sleep would affect her job performance, she did what so many others do - she searched online, where she found an article about sleep eating as well as an ongoing study about the disorder. “It was a huge relief to realize that it’s a real condition and I’m not being crazy.”

Scientists now divide parasomnias into two main groups, depending on whether or not they occur during the rapid eye movement, or REM, phase of sleep, when dreaming occurs. About 0.5 percent of adults, mostly men, have a rare condition called REM sleep behavior disorder that causes violent thrashing during sleep.

There are other REM disorders, including nightmare disorder, marked by horribly disturbing dreams. One of the most terrifying parasomnias, Dr. Schenck said, is sleep paralysis, which really does not fit into either of the main categories. It hits people as they are about to fall asleep or are about to wake up, rendering them unable to move.

Clonazepam, an anticonvulsant and anti-anxiety medication, helps up to 90 percent of people with REM sleep behavior disorder, though it makes some people drowsy the following day. Cal Pope, the sleep thrasher in the parasomnia documentary, has taken the pills successfully for years, though Dr. Schenck cautions that when people stop taking the drug, even for a few days, the sleep violence can return immediately.

Recent evidence also suggests that REM sleep behavior disorder may be an early harbinger of Parkinson’s disease or other neurodegenerative disorders linked to defects in the dopamine system in the brain. These clues have prompted some experts to use drugs like pramipexole (Mirapex) that boost dopamine levels to treat people who thrash in their sleep. In a small study published in Sleep Medicine, Dr. Markus H. Schmidt, the medical director of the Ohio Sleep Medicine Institute, found that pramipexole helped nine of 10 volunteers.