Quick Answer
Sometimes. In the main study on this question, 60% of migraine patients who had sex during an attack reported their headache improved, while 33% said it got worse. Cluster headaches responded less well: 37% improved and 50% worsened. The evidence comes from one observational survey, so sex is not a proven headache treatment. A sudden, severe headache during sex needs emergency care.
The strongest evidence on this question comes from a 2013 observational study published in Cephalalgia, the journal of the International Headache Society. Its results show that the answer depends heavily on the type of headache:
- Migraine: 60% of those who tried it reported improvement
- Cluster headache: 37% reported improvement, while 50% reported worsening
- Sexual activity can also cause headaches, a recognized condition known as sexual headache
Table of Contents
The Study Behind the Claim
Researchers at the University of Münster in Germany mailed anonymous questionnaires to 800 migraine patients and 200 cluster headache patients from a tertiary headache clinic. In total, 38% of migraine patients and 48% of cluster headache patients replied.
About one-third of respondents had ever had sexual activity during an attack: 34% of migraine patients and 31% of cluster headache patients. The other two-thirds had never tried it. That is the first practical takeaway: most people with severe headaches avoid sex during an attack altogether.
The study defined sexual activity as intercourse or masturbation aimed at reaching orgasm.
Migraine Results
Among the 103 migraine patients who had sexual activity during an attack:
- 60% reported improvement, and 70% of that group described the relief as moderate to complete
- 33% reported worsening
- Some reported improvement during some attacks and worsening during others
The researchers calculated that 42.7% of these migraine patients could be classed as “responders” with at least moderate relief, a rate they described as similar to studies of acute migraine medication. That comparison is the authors’ interpretation of self-reported relief, not a measured pain score, so it should not be read as proof that sex works as well as medication.
Cluster Headache Results
Cluster headache responded much less favorably:
- 37% reported improvement, though 91% of that group rated the relief as moderate to complete
- 50% reported worsening
Relief is less likely with cluster headache, but when it happens it tends to be substantial. Worsening is the more common outcome, affecting half of those who tried.
Why Sex Might Relieve a Headache
The study did not test a mechanism, but the researchers discussed several possible explanations:
- Endorphin release. Sexual arousal and orgasm release endorphins, the body’s natural pain-relieving chemicals.
- Distraction from the pain.
- Post-orgasm relaxation and changes in blood pressure.
- Brain activity in the hypothalamus. Orgasm strongly activates the hypothalamus, a brain region also active during cluster headache attacks.
The timing varied. Among migraine patients, 43% noticed the change shortly after orgasm or peak excitement, 18% exactly at orgasm, 20% at the start of sexual activity and 20% within 30 minutes afterwards. The study also found that the effect did not depend on the type of sexual activity, so masturbation and intercourse produced similar results.
Do Men Benefit More Than Women?
In this study, male migraine patients reported relief more often than women (73% versus 58%). Among patients who experienced relief, 36% of men used sex regularly as a headache treatment, compared with 14% of women. In cluster headache, 10 of the 11 patients who reported relief were men.
Treat this as an observation, not a conclusion. Only 15 men with migraine reported sexual activity during an attack, which is a very small group, and the researchers could not explain the difference. It may reflect differences in reaching orgasm, sexual habits or reporting.
When Sex Causes Headaches Instead
Headache triggered by sexual activity is a recognized condition. The International Classification of Headache Disorders calls it “primary headache associated with sexual activity,” and it affects roughly 1% of people at some point.
It can present in two ways:
- A dull ache in the head and neck that builds as sexual excitement increases
- A sudden, explosive headache just before or at orgasm
Older classifications treated these as two separate types. The current classification (ICHD-3) groups them as one condition with variable symptoms. Most cases are benign and often come in bouts that settle over weeks to months. However, the sudden explosive form can look exactly like a serious bleed or blood vessel problem, so a first episode always needs medical assessment.
Can ED Medication Cause Headaches?
Yes. Headache is one of the most common side effects of PDE5 inhibitors, the drug group that includes sildenafil (Viagra) and tadalafil (Cialis). These medicines widen blood vessels, which can trigger a headache, especially at higher doses. If headaches appear only when you take ED medication, a urologist can adjust the dose or switch treatments.

Some medications used to prevent migraine or sexual headache, such as beta-blockers, can also affect erections. Our guide on whether blood pressure medications like amlodipine cause erectile dysfunction explains how these drugs can interact with sexual function.
Warning Signs That Need Emergency Care
Call 911 or go to the emergency room for a headache during sexual activity with any of these features:
- Sudden onset that reaches maximum intensity within one minute (a “thunderclap” headache)
- Neck stiffness, vomiting, fainting or confusion
- Vision changes, weakness, numbness or difficulty speaking
- The worst headache you have ever had
A first thunderclap headache during sex can be caused by a subarachnoid hemorrhage (bleeding around the brain), a tear in a neck artery (arterial dissection) or reversible cerebral vasoconstriction syndrome (RCVS), a condition in which brain arteries temporarily narrow. Only medical imaging can tell these apart from a benign sexual headache.
What the Evidence Does Not Show
The Münster study is observational and relied on patients’ own recollections. Its main limitations:
- Low response rates. Fewer than half of patients replied, and those with notable experiences may have been more likely to respond.
- No control group. Headaches often ease on their own, and the study cannot separate that from any effect of sexual activity.
- Severe cases only. Patients came from a specialist headache clinic, so they may not represent people with milder headaches.
- Small numbers. Only 133 patients in total had sexual activity during an attack.
No randomized trial has tested sexual activity as a headache treatment. The authors themselves concluded that the findings are not strong enough to recommend sex as a treatment for every patient. Treat the results as suggestive, not conclusive.
If You Want to Try It

If you and your partner are comfortable with it, you can see whether it helps your own headaches:
- Only try it with a familiar headache you already have a diagnosis for, never with a new or unusual headache
- Keep a headache diary noting the headache type, pain before and after, and timing
- Expect results to vary from one attack to another
- Stop if sexual activity regularly makes your headaches worse
- Keep using your prescribed headache medication rather than replacing it
Feeling anxious that sex might trigger a headache can affect sexual performance too. If worry about headaches is affecting your erections, read about psychological erectile dysfunction and how long temporary ED usually lasts.
Frequently Asked Questions
Does masturbation relieve headaches as well as sex?
In the Münster study, the change in headache did not depend on the type of sexual activity, so masturbation and intercourse produced similar results. No controlled study has compared the two directly.
Can sex trigger a migraine attack?
Yes. One-third of migraine patients in the study reported that sexual activity made their attack worse. Sexual activity can also trigger a separate condition, primary headache associated with sexual activity.
How quickly does headache relief happen?
Most patients who noticed relief felt it at or shortly after orgasm, but about one in five noticed a change at the start of sexual activity and another fifth within 30 minutes afterwards.
Is a headache during sex dangerous?
Most are benign. However, a first sudden, severe headache during sex needs emergency assessment to rule out bleeding around the brain, arterial dissection or RCVS.
Why do I get a headache after taking Viagra or Cialis?
These medications widen blood vessels, and headache is one of their most common side effects. Talk to your urologist if headaches are frequent or severe.
Do painkillers work better than sex for migraines?
Acute migraine medications are supported by controlled clinical trials. The evidence for sexual activity comes from a single observational survey, which is much weaker evidence.
Talk to a Specialist About Sexual Health Concerns
Headaches linked to sex, ED medication side effects and anxiety about sexual performance are all worth discussing with a doctor. The board-certified urologists at Erectile Specialist in San Jose can help with erectile dysfunction and related sexual health concerns. Contact us or call (408) 358-2030 to book a confidential consultation.
Board-Certified Urologists · San Jose, CA
Don’t suffer in silence. Let’s fix your erectile dysfunction.
Confidential consultations with urologists who have treated ED in the San Jose area for over 30 years. Medication, shockwave therapy and advanced options, all in one clinic.
Mon–Fri, 9 AM – 5 PM · 2460 Samaritan Dr, San Jose, CA 95124
