Migraine made bigger than usual headlines recently after a study indicating that sex may be helpful in relieving migraine pain appeared in the journal Cephalalgia.

While some of the headlines were clearly meant to grab attention, the science behind the study and its findings may prove valuable for many migraineurs. While most individuals with migraine and cluster headache do not engage in sexual activity during a headache attack, the findings suggest that sexual activity, orgasm in particular, can provide partial or complete relief of headache pain in some migraine and a few cluster headache patients.

For this study, researchers at the University of Munster in Germany sent a questionnaire inquiring about sexual activity during a headache attack to 800 migraine patients and 200 cluster headache patients. In all, 38% of the migraineurs and 48% of the patients with cluster headache replied. Among migraineurs, 34% reported sexual activity during an attack, with 60% indicating that sexual activity improved their headache pain or stopped it completely, and 33% reported that sexual activity made their pain worse.

For individuals with cluster headache, 31% of the respondents reported sexual activity during a headache attack, with 37% of those individuals reporting an improvement in their pain and 50% reporting a worsening of their pain.

Sex appeared to benefit men more than women, with 36% of men using sexual activity as a therapy for dealing with their headache compared to 13% of women.

The reason that sexual activity helps, according to the researchers, may be because of endorphins, the body’s painkillers, which are released in some people with orgasm. Study author Stefan Evers, a neurologist and headache specialist, commented on this aspect of the study.

“The same people who release endorphins from extreme sports activity … it might be that these are the patients who release endorphins during sexual activity,” Evers reported to LiveScience.

Other headache specialists noted that while sexual activity may help some, it’s not for everybody in the midst of a migraine or cluster headache attack. Many migraineurs do not like to be touched during an attack and are extremely sensitive to light, noise, odors and other stimuli.