VitMode

Headache After Exercise, Coughing and Sex: Causes and When to Get Tested

A headache brought on by exertion, coughing or sexual activity is most often a benign primary headache that responds well to indomethacin. But this is one of those situations in which benignity must not be assumed: almost half of cough headaches have a secondary cause, usually a type I Chiari malformation, and a sudden 'thunderclap' pain with exertion or sex may mean subarachnoid haemorrhage or reversible cerebral vasoconstriction syndrome. We explain how to tell primary from secondary forms, when a CT scan and MRI are needed and what to do with a first headache of this kind.

Redakcja VitMode — Sen i neurobiologiathe VitMode editorial team, no individual bylinesPublished13 min read
How this article was made
Author
Redakcja VitMode — Sen i neurobiologia — the VitMode editorial team, no individual bylines
Method
Prepared from primary sources: clinical trials, meta-analyses and guidelines. We describe study findings separately from our interpretation.
Source verification
Cited PubMed papers are automatically checked for a matching identifier, title and publication year.
Medical review
none — this article has not been reviewed by a physician
Last updated

The content is educational and does not replace medical advice. Read the full editorial process

Table of contents

Why does the head hurt after exercise, coughing or sex?

A headache brought on by coughing, physical exertion or sexual excitement is usually a primary headache — that is, one that does not result from any other disease — but with a first episode this cannot be assumed without tests. All three types have in common that they are provoked by a sudden rise in pressure in the chest and abdomen (the Valsalva manoeuvre) and by changes in blood flow in the brain, and in some cases a serious secondary cause lies behind the symptom.

A clinical review published in Headache notes that cough headaches are the commonest reason for consultation of the three types, and almost half of them have a secondary cause, usually a type I Chiari malformation. By contrast, exertional and sex-related headaches are more often primary than secondary. This differentiation is the heart of the article: each type has a different probability of a serious cause and different indications for tests.

Three types of activity-provoked headache: how do they differ?

The ICHD-3 classification distinguishes three related primary diagnoses. Primary cough headache appears only in connection with coughing, straining or other Valsalva manoeuvres, begins suddenly and lasts from a second to about 2 hours. Primary exercise headache occurs during or after strenuous physical exercise and lasts less than 48 hours; it is often pulsating. Primary headache associated with sexual activity begins during the activity, builds with excitement or appears suddenly at orgasm, and lasts from a minute to about a day (or up to 72 hours in the mild form).

Mechanism: why does a Valsalva manoeuvre hurt the head?

During coughing, straining, lifting or orgasm, pressure in the chest and abdomen rises abruptly, which transiently raises pressure in the veins and alters the pressure of the cerebrospinal fluid. In healthy people the vascular system of the brain compensates for these fluctuations. In primary headache the mechanism is not fully understood — sensitivity of the venous vessels and meninges to rapid pressure changes is suspected, as well as hyperreactivity of the arteries. These are mechanistic hypotheses, not established facts.

The response to indomethacin also matters: it is a non-steroidal anti-inflammatory drug which — unlike ordinary ibuprofen — acts strongly in the group of so-called indomethacin-responsive headaches (cough, exertional, sex-related, paroxysmal hemicrania). The exact reason for this exceptional sensitivity is unknown; it is thought that the drug lowers cerebral blood flow and intracranial pressure, but this is a theory. For the patient the practical conclusion is that the effectiveness of indomethacin supports the diagnosis of a primary form, but its absence or an incomplete response does not settle the diagnosis — it is one clue, not a test.

The second layer is structural and vascular causes, in which the Valsalva manoeuvre acts as a 'trigger'. A type I Chiari malformation consists of the cerebellar tonsils descending below the foramen magnum, which obstructs the flow of cerebrospinal fluid; coughing abruptly raises the pressure and provokes occipital pain. Posterior fossa tumours, cysts or hydrocephalus can act similarly. Sudden, thunderclap pains with exertion or sex may also result from a ruptured aneurysm (subarachnoid haemorrhage), dissection of a carotid or vertebral artery or reversible cerebral vasoconstriction syndrome (RCVS).

Cough headache: when is it a Chiari malformation?

Cough headache is particularly insidious because both forms — primary and secondary — look similar to the patient: a short, sharp, 'bursting' pain after coughing, sneezing, laughing or bending. The differences are noticed only by careful questioning and examination.

This review is narrative (clinical description and expert opinion) and not a of randomised trials, so we rate the level of evidence as moderate. The practical conclusion, however, is consistent with the literature: pain with coughing is a reason for an MRI, not for long-term self-treatment with painkillers. We write about the examination itself in the entry on magnetic resonance imaging.

Headache after physical exertion: running, the gym, lifting

Primary exertional headache is a pain appearing during or after strenuous exertion — running, strength training, swimming, but also lifting or climbing. As a literature review in Current Pain and Headache Reports summarises, it is an uncommon, self-limiting and short-lasting disorder, often coexisting with migraine, considered benign, and responsive to avoidance of the trigger and to indomethacin.

Factors that clinical observation suggests favour exertional headaches are heat, high altitude, dehydration, undereating before training and exertion without a warm-up. For none of them, however, are there strong controlled studies; we treat them as reasonable pointers. A headache appearing only during sudden, maximal exertion (for example heavy deadlifts with breath-holding) is sometimes linked to the Valsalva manoeuvre — adjusting breathing technique and grading the loads may help, though it does not replace investigation.

Headache during sex: how common and when is it dangerous?

Primary headache associated with sexual activity is a well-defined, benign disorder, but its first episode can be frightening because the pain may be sudden and very severe at orgasm. A 2025 meta-analysis estimated its frequency among adults presenting with headache to specialist centres.

Two things need separate explanation. First, this meta-analysis concerns the frequency of the benign diagnosis among patients seeking help — it does not say how often a headache during sex turns out to be dangerous; the data do not answer that question. Second, a sudden thunderclap pain linked to orgasm may be a symptom of subarachnoid haemorrhage or of reversible cerebral vasoconstriction syndrome (RCVS), a disorder in which the arteries of the brain narrow temporarily. A first episode should therefore never be brushed aside: it needs assessment and, when in doubt, imaging of the vessels.

Thunderclap headache: subarachnoid haemorrhage and RCVS

Thunderclap headache is a pain of sudden onset reaching maximum intensity within a minute. It may occur spontaneously or in connection with exertion, coughing or sex. In the ICHD-3 classification primary thunderclap headache is a diagnosis of exclusion, so the dangerous causes must be checked first: subarachnoid haemorrhage from a ruptured aneurysm, dissection of the carotid or vertebral arteries, cerebral venous thrombosis, stroke, pituitary apoplexy and RCVS.

The Ottawa SAH rule mentioned takes into account, among other things, age of at least 40, neck pain or stiffness, witnessed loss of consciousness, onset of pain during exertion, thunderclap headache and limited neck flexion. This shows that 'onset during exertion' is one of the recognised alarm signals. A 99% sensitivity means that in a person with none of these criteria haemorrhage is very unlikely; low specificity means that most people with a positive rule do not have haemorrhage but still need to be examined. It is a tool for doctors in the emergency department, not for self-assessment at home.

Check your profile

Not sure which supplements actually make sense for you?

Answer a few short questions about your lifestyle, diet, sleep, and goals. VitMode will build your profile and show supplements worth considering — with reasoning and evidence strength.

Takes about 2 minutesBased on scientific evidence

Recommendations take your answers and the strength of the scientific evidence into account. A supplement's popularity has no bearing on whether it gets recommended.

Which tests are done and what do they mean?

The choice of tests depends on the picture of the pain. For thunderclap pain or suspected haemorrhage the first step is a CT scan of the head (as soon as possible after the pain begins), and if it is negative but suspicion remains high, further investigation at the doctor's discretion (for example examination of the cerebrospinal fluid or angiography). For cough headaches an MRI of the brain and craniocervical junction is recommended (to exclude a Chiari malformation and posterior fossa lesions). If narrowing of the vessels or dissection is suspected, MR angiography or CT angiography is added.

If all tests are normal and the picture fits a primary form, the diagnosis has a good prognosis. Most often the problem resolves on its own within months to a few years, though in some people it recurs. It should not be assumed in advance, however, that after one normal test it will 'never' be necessary to return to investigation: a change in the character of the pain, new symptoms or pain different from before is a reason for reassessment.

Treatment and prevention of primary headaches

An effective option in both classic primary forms is indomethacin, used under a doctor's supervision (a non-steroidal anti-inflammatory drug that burdens the stomach, kidneys and circulation). The available data are mainly case series and expert opinion rather than large randomised trials, so the strength of evidence is moderate or low. The literature has also described the effectiveness of some other drugs (for example propranolol), but there are no strong comparative data; the decision belongs to the doctor.

Myth: 'it's just exertion, it will pass'

Myth

A headache with exertion, coughing or sex is always a harmless 'strain' and no tests are needed.

Fact

Often it is — primary forms are common and benign — but that diagnosis is made only after secondary causes have been excluded. Almost half of cough headaches have a secondary cause, and a sudden thunderclap pain with exertion or sex may mean subarachnoid haemorrhage or RCVS. A first episode, long-lasting pain or accompanying neurological symptoms therefore need medical assessment, not waiting it out.

When to see a doctor? Red flags

Limits of the data and summary

QuestionShort answer
When to suspect a primary form?A repeatable, short pain only after the same trigger, without other symptoms, responding to indomethacin
How often is cough headache secondary?Almost half of cases, usually a type I Chiari malformation (Alvarez 2014)
Which test for cough headache?MRI of the head and craniocervical junction
How common is sex-related headache?Rare: about 0.37% of those with headache in specialist centres; more often men, about age 37
What does thunderclap pain mean?Sudden pain peaking within a minute — urgently exclude subarachnoid haemorrhage, dissection, RCVS
Does the Ottawa rule help?Very sensitive (99%) for excluding SAH, of low specificity; a tool for emergency doctors
Which drug in primary forms?Indomethacin under a doctor's supervision; evidence mainly from case series
Headache after exercise, coughing and sex in brief

Our editorial take

Headache provoked by exertion, coughing or sex is one of the few headaches in which the commonest explanation is benign while the most dangerous is rare but not to be missed. The rule is therefore simple: a first episode is assessed by a doctor, and cough with pain at the back of the head is a reason for an MRI. When investigation excludes secondary causes the prognosis is usually good, and treatment — indomethacin and sensible adjustment of exertion — is effective in many people. Without investigation it is easy either to fear needlessly or to dismiss dangerously.

A benign headache can be diagnosed only once a dangerous one has been excluded. The order matters here more than self-assurance.
VitMode editorial team

Frequently asked questions

Coughing abruptly raises pressure in the chest and abdomen, which changes venous and cerebrospinal fluid pressure. In some people this provokes a short primary headache, but almost half of cough headaches have a secondary cause, usually a type I Chiari malformation. That is why every patient with such pain is advised to have an MRI of the head and craniocervical junction.

Most often not — primary exertional headache is benign, self-limiting and lasts less than 48 hours. At the first occurrence, with pain lasting longer than 24 hours, after age 40 or with other symptoms, however, secondary causes, including subarachnoid haemorrhage, should be excluded with imaging.

It is often a benign primary headache, but a first episode, especially a sudden and very severe one at orgasm, needs assessment because it may mean subarachnoid haemorrhage or RCVS. Primary sex-related headache is diagnosed after these causes have been excluded. According to a meta-analysis it is a rare diagnosis, more common in men at about age 37.

It is a pain that begins suddenly and reaches its maximum within a minute, like a thunderclap. In that case call an ambulance or go to the emergency department urgently, because it may be subarachnoid haemorrhage, arterial dissection or RCVS. Primary thunderclap headache is diagnosed only after these causes have been excluded.

Yes, primary cough, exertional and sex-related headaches belong to the so-called indomethacin-responsive headaches, and a response to indomethacin supports the diagnosis. The evidence comes mainly from case series and expert opinion. The drug burdens the stomach, kidneys and circulation, so it should be used under a doctor's supervision after secondary causes have been excluded.

After secondary causes have been excluded, training can usually be continued with adjustments: a warm-up, gradual increases in intensity, hydration, avoiding heat and excessive breath-holding with heavy loads. Until a diagnosis is made it is better to take a break and consult a doctor, especially after a first episode.

When haemorrhage is suspected a CT scan of the head is usually first, and for cough headache an MRI of the head and craniocervical junction. If narrowing or dissection of the arteries is suspected, MR angiography or CT angiography is added. The doctor decides the range of tests from the history and symptoms.

Sources (6)

Sources are numbered. PubMed items are automatically verified (identifier, title, year).

  1. 1Alvarez et al. 2014 — Headache (differentiating primary and secondary cough, exertional and sexual headaches)PubMed
  2. 2Halker and Vargas 2013 — Current Pain and Headache Reports (primary exertional headache)PubMed
  3. 3Osiowski et al. 2025 — Headache (epidemiology of headache associated with sexual activity)PubMed
  4. 4Roostaei et al. 2025 — Academic Emergency Medicine (Ottawa and Emerald rules in subarachnoid haemorrhage)PubMed
  5. 5de Sousa et al. 2026 — Headache (review of RCVS)PubMed
  6. 6Headache Classification Committee of the IHS 2018 — Cephalalgia (ICHD-3)PubMed
VM

Redakcja VitMode — Sen i neurobiologia

VitMode editorial team — no individual bylines; content based on primary sources

VitMode Editorial — Sleep and Neurobiology is the VitMode editorial team responsible for: sleep, circadian rhythm, cognition and recovery. The team has no individual bylines — texts are prepared by VitMode editors from primary sources (clinical trials, meta-analyses, guidelines). Every cited PubMed paper is automatically checked for a matching identifier, title and publication year. The content is educational and does not replace medical advice. Factual errors can be reported in a comment under the post or through the contact form; corrections are made by the editorial team.

Explore the topic further

Related topics from the VitMode knowledge base — pick the area you care about.

This article

Headache After Exercise, Coughing and Sex: Causes and When to Get Tested

Your learning path

Path: Headache After Exercise, Coughing and Sex

0 of 7 read0%
  1. Learn the basics

  2. Learn about treatment

  3. Related topics

Progress is saved in this browser only.

Start the path
Tools for this topic

Your entries stay in your browser and are never sent anywhere. This is a notebook, not a diagnostic tool — it does not diagnose or recommend treatment. Discuss results with your doctor.

Questions readers often ask

Short answers from related articles — click to read more.

How long does a cluster headache attack last?

According to the ICHD-3 classification a single attack lasts 15 to 180 minutes if untreated. In the active period it can recur from once every other day to several, even eight, times a day. In the episodic form the whole cluster…

From the article: Cluster Headache: Symptoms, Attack Treatment and Prevention
How long does a tension-type headache last?

According to the ICHD-3 criteria a single episode lasts from 30 minutes to 7 days. In the chronic form the headache may occur on at least 15 days a month, and in some people it is almost continuous, though with fluctuating…

From the article: Tension Headache: Symptoms, Causes and What Helps (Medication, Habits, Exercise)
What are the symptoms of trigeminal neuralgia?

Typical are recurrent, one-sided attacks of very severe pain in the area of the face (cheek, jaw, lower jaw, forehead), resembling an electric shock or a stab, lasting from a fraction of a second to 2 minutes. They are usually…

From the article: Trigeminal Neuralgia: Symptoms, Causes and Treatment
What is medication-overuse headache?

It is a chronic headache (15 or more days a month) arising in a person with a pre-existing headache, most often migraine or tension-type headache, who takes acute drugs too often and for too long. According to ICHD-3 this…

From the article: Medication-Overuse Headache (Rebound): How to Recognise It and Come Off the Drugs

Did not find your answer? Write to us — we do not give individual advice, but we can point to reliable sources. Ask the editors

Related knowledge base entries