When you're crippled with a splitting headache, the last thing you're probably in the mood for is sex.
But German researchers believe it could be a simple painkiller for a lot of migraine sufferers.
More than 50 percent of migraine sufferers in a study who had had sex during a migraine reported an improvement in symptoms, and as many as one in five said it stopped the pain completely.
The researchers believe that the solution could be thanks to the release of endorphins from sex, which work as natural painkillers in the body.
"Sex can abort migraine and cluster headache attacks, and sexual activity is used by some patients as acute headache treatment," the University of Munster researchers said.
"Our results show that sexual activity during a migraine attack might relieve or even stop an attack in some cases, and that sexual activity in the presence of headache is not an unusual behaviour."
The team of neurologists studied the survey responses of more than 300 migraine sufferers and 96 people who suffered cluster — or one-sided — headaches.
They questioned them about their sexual experiences during headaches and how it affected their pain.
More than a third of the migraine patients had had sex during an attack, and of those, almost two thirds reported an improvement in their condition. The other third reported their migraine had worsened.
Of those suffering cluster headaches, a third had experimented with sex during an attack, and 37 percent of that group reported their condition had improved, while 50 percent said their condition had worsened.
"In total, 42.7 percent of all migraine patients experienced at least 50 percent relief — a response rate as high as in studies on acute medication," the researchers wrote.
"Some patients, in particular male migraine patients, even used sexual activity as a therapeutic tool."
Dean Watson, a muscular skeletal physiotherapist and director of the Watson Headache Clinic, told ninemsn that insufficient serotonin levels can cause sensitivity in the brain stem, which leads to migraines.
"We know that pleasure is going to increase the levels of serotonin and therefore it's going to desensitise the brain stem," he said.
"Triptans — the migraine medication — work by desensitising the brain stem. Serotonin does the same thing, so I'm not surprised by the results of this study."
Watson said exercise and getting plenty of sunlight can also boost serotonin levels.
"This deals with the symptoms, but the reason for the sensitisation in the first place is going to be typically disorders of the neck," he said.
The study was published in the International Headache Society's journal Cephalalgia.