Why Do I Get a Headache After Working Out?

Post-workout headaches are surprisingly common, affecting roughly 5% of the general population at some point. The most typical cause is a spike in blood pressure inside your skull during intense physical effort, though dehydration and electrolyte loss can also trigger or worsen the pain. The good news: most exercise headaches are harmless and resolve on their own, often within minutes to hours.

What Happens in Your Head During Exercise

When you exercise hard, your heart pumps more blood to meet the demand. The veins and arteries in your brain expand to accommodate that increased flow, and the resulting pressure inside your skull is what produces the pain. Think of it as your cardiovascular system outpacing what your brain’s surroundings can comfortably handle in the moment.

This is why exercise headaches tend to strike during or right after the most strenuous part of a workout, not during a casual warm-up. Activities that involve heavy lifting, sprinting, or sustained all-out effort are the most common triggers because they cause the sharpest jumps in blood pressure. Holding your breath while straining (common during heavy lifts) amplifies the effect.

Dehydration and Electrolyte Loss

Sweating doesn’t just cost you water. You also lose sodium, magnesium, and other electrolytes that help regulate fluid balance and nerve signaling. Sodium is particularly important here: it controls how water moves between your cells, and when levels drop too low, water shifts into cells and causes them to swell. In brain cells, even mild swelling can produce a headache.

Magnesium, meanwhile, helps regulate blood pressure and supports normal nerve function. Losing it through sweat can make you more susceptible to headaches, dizziness, and that general “off” feeling after a tough session. If you’re exercising for longer than 45 minutes or sweating heavily, plain water alone may not be enough. A low-sugar sports drink or adding a pinch of salt to your water can help replace what you’ve lost. Drinking steadily throughout the day before your workout matters more than chugging water right before you start.

Other Common Triggers

Several environmental and lifestyle factors make post-workout headaches more likely:

  • Altitude. Exercising above about 2,500 meters (8,200 feet) reduces the oxygen available to your brain. Headaches at elevation are typically felt on both sides of the head and get worse with exertion.
  • Heat and humidity. Hot environments increase sweat rate, accelerating fluid and electrolyte losses. They also force your cardiovascular system to work harder to cool you down, compounding the pressure changes in your skull.
  • Skipping a warm-up. Jumping straight into high-intensity effort causes a more abrupt spike in blood pressure than easing into it gradually. A progressive warm-up gives your blood vessels time to adjust.
  • Low blood sugar. If you haven’t eaten in several hours, your brain’s fuel supply is already compromised before you add the metabolic demand of exercise.
  • Caffeine timing. Caffeine constricts blood vessels. If you normally drink coffee and skip it before a workout, the rebound dilation can contribute to a headache. Conversely, too much caffeine beforehand can raise blood pressure further.

How Long Exercise Headaches Last

A typical primary exercise headache lasts between 5 minutes and 48 hours. Most people describe it as a throbbing pain on both sides of the head that peaks during or just after the hardest part of their workout, then gradually fades. If yours consistently resolves within a few hours and doesn’t come with any other symptoms, it fits the pattern of a benign exercise headache.

Some people get them in clusters for a few weeks or months and then don’t experience them again for years. Others find they’re tied to specific activities. Weightlifters, rowers, and runners during interval sessions report them more often than people doing moderate, steady-state cardio.

How to Prevent Post-Workout Headaches

Most exercise headaches respond well to simple adjustments. Start by hydrating throughout the day, not just at the gym. Aim for roughly 1.5 to 2 liters of water daily as a baseline, and take water breaks during your workout rather than waiting until you’re thirsty. If you’re sweating heavily, add electrolytes.

Warm up for at least 5 to 10 minutes before ramping up intensity. This is especially important for activities like sprinting or heavy compound lifts where blood pressure changes are abrupt. A gradual increase in heart rate lets your blood vessels dilate at a pace that produces less skull pressure.

Pay attention to your breathing during lifts. Holding your breath through a heavy rep (the Valsalva maneuver) dramatically increases pressure in your chest and head. For most recreational lifters, exhaling during the effort phase of each rep reduces this spike without sacrificing much performance. Also consider whether you’re clenching your jaw or tensing your neck and shoulders, both of which can contribute to tension-type headaches layered on top of the exertional component.

If heat or altitude is a factor, adjust your expectations. Train during cooler parts of the day, move indoors when conditions are extreme, and give yourself several days to acclimatize when exercising at elevation.

When a Workout Headache Needs Attention

Most exercise headaches are harmless, but a small number are caused by serious underlying problems, including bleeding around the brain, blood vessel abnormalities, tumors, or blockages in cerebrospinal fluid flow. These secondary exercise headaches can look similar to the benign kind at first, which is why certain features should prompt you to get checked out quickly.

Seek medical attention if your headache comes on suddenly and severely (sometimes described as a “thunderclap”), if it’s the first headache of this type you’ve ever had, or if it comes with vomiting, loss of consciousness, double vision, or neck stiffness. Secondary exercise headaches also tend to last longer, often persisting for several days rather than resolving within hours. A headache that lingers well beyond 48 hours after exercise warrants evaluation.

If you’re getting exercise headaches regularly, even mild ones, it’s worth mentioning to your doctor. Imaging can rule out structural causes, and once those are excluded, there are straightforward strategies to manage the primary type so it doesn’t keep you from training.