Researchers have found that having sex during a headache attack can be just as effective as using painkillers and more fun as well.

The study showed that more than half of migraine sufferers that had sex during a migraine had fewer symptoms and 20 percent had their pain go away completely. Researchers believe this happens because having sex releases endorphins, which are brain chemicals that are produced when in pleasure. These chemicals also act as natural pain killers in the nervous system and can lessen the effects of a headache.

"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," said researchers.

"Sex can abort migraine and cluster headache attacks, and sexual activity is used by some patients as acute headache treatment."

The University of Munster in a Germany group collected information from 400 patients that had either cluster migraines or "one sided" headaches over a two-year span.

The researchers found that around 33 percent of their patients had sex during a headache, and from that group, 60 percent of migraine sufferers and 36 percent of cluster headache sufferers had lessening of their symptoms.

Some 36 percent of men and 16 percent of women used sex to lessen their headache symptoms during the study period. Also, 19 percent of those that used sex to combat their headache had a complete remission of the pain while 51 percent had a moderate decrease in pain.

Researchers said that "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."

If this treatment is as successful as medication, shouldn't doctors be suggesting it more?

Research was published in International Headache Society's journal Cephalalgia.