Exercise has a dose-response relationship with migraine that goes in both directions. Sudden vigorous exertion can trigger an acute attack in susceptible individuals (the ICHD-3 entity is “primary exercise headache”). Regular moderate aerobic exercise is one of the few non-pharmacological interventions with controlled-trial evidence for reducing attack frequency.

The honest framing isn’t “exercise is good” or “exercise is a trigger” — it’s “find the dose that keeps you below your personal threshold while still getting the preventive benefit.”

The two patterns

Exertional migraine (the trigger pattern)

ICHD-3 4.2 (“primary exercise headache”) describes an acute headache precipitated by vigorous exertion — particularly heavy weightlifting, sprinting, or strenuous aerobic work above the patient’s accustomed intensity. The mechanism likely involves vasodilation, increased intracranial pressure during Valsalva manoeuvres, and trigeminovascular activation.

Patients with this pattern typically:

  • Get attacks within minutes to hours of the exertion.
  • Have more reliable triggering at higher altitude or in heat.
  • Often respond well to NSAIDs taken before known-trigger activity.

This is distinct from regular migraine, but the two coexist frequently — the same patient might have weekly stress-and-sleep migraine attacks and separately get an exercise-triggered attack after a particularly hard run.

Regular exercise as prevention (the protective pattern)

The Varkey 2011 trial (Cephalalgia) compared 12 weeks of indoor cycling 3×/week against relaxation training and standard topiramate prevention. All three reduced migraine frequency similarly — exercise matching one of the standard preventive drug regimens in effect size.

Subsequent meta-analyses have consistently supported moderate aerobic exercise (40–60 minutes, 3+ times/week, sustained over 8+ weeks) as a preventive intervention with effect sizes in the range of pharmacological preventives.

The proposed mechanisms include improved sleep, stress reduction, beta-endorphin release, vascular conditioning, and possibly direct effects on cortical excitability.

Why the contradiction is resolvable

The triggering and the prevention happen at different intensities and on different timescales:

  • Acute, supra-threshold exertion → trigger.
  • Sustained, sub-threshold regular exertion → prevention.

The challenge is that your threshold rises with conditioning. Someone untrained can be triggered by a 5-minute jog; the same person 8 weeks into regular exercise may tolerate 45 minutes without triggering.

This is the practical implication: most people can do exercise as prevention — they just have to start well below their current threshold and build gradually. Going from zero to a hard workout on day 1 is the canonical way to trigger an attack and conclude “exercise is bad for my migraines”.

Heat, altitude, hydration interactions

Exertional migraine triggers compound:

  • Heat lowers the threshold significantly.
  • Altitude does too (higher pulmonary demand + relative hypoxia).
  • Dehydration during the workout amplifies risk.

The Texas summer outdoor run that triggers you in July may not trigger you in the same effort indoors in February. Track the specifics if you suspect the pattern.

How Hermly handles workout days

A specific design detail worth knowing: Hermly’s scoring logic explicitly excludes workout days from low-HRV trigger detection. Reason: vigorous exercise produces a measurable HRV dip for 24+ hours afterward, and without the workout context the model would misread it as autonomic strain signalling an oncoming attack.

The correction is large enough to push borderline cases out of the “candidate migraine day” classification when a workout explains the low HRV.

This is a small example of why “more sensor data” doesn’t automatically produce better predictions — context matters. A 24-hour HRV drop after a 5K run is healthy; the same drop on a sedentary day is a different signal.

What this isn’t

Not a recommendation to start a new exercise programme — that’s a conversation with your doctor, especially if you have other cardiovascular risk factors. Not a claim that exercise “replaces” preventive medication for everyone — for some patients, both are needed.

What it is: a correction to the “exercise is my trigger” framing that sometimes leads patients to stop exercising entirely. The evidence is that, dosed correctly, regular moderate exercise helps far more often than it hurts.