Headaches After Exercise

Medically Reviewed by Shruthi N, MD on July 22, 2024
8 min read

Exercise-related headaches typically cause throbbing pain on both sides of your head. Exercise headaches can develop either after you finish a tough workout or while you're exercising. Both aerobic exercises (such as running and biking) and weightlifting can trigger them. They also can occur at other times, like when you:

  • Cough or sneeze
  • Have sex
  • Strain on the toilet

There are two types of exercise headaches:

Primary exercise headache

Usually harmless, primary exercise headaches aren't a sign that there’s anything wrong with your health. Experts don’t know why they happen, but it may be due to the widening of the blood vessels in your brain when you exercise. They can last as little as 5 minutes or as long as 2 days.

Secondary exercise headache

These exercise headaches signal that something’s wrong, often something serious. The headache itself feels similar to a primary exercise headache — throbbing pain on both sides of your head — but other symptoms also may occur, including:

  • Vomiting
  • Passing out
  • Double vision
  • Stiffness in your neck

These headaches, which usually last at least a day and can continue for several days, may be caused by:

  • Subarachnoid hemorrhage, or bleeding between the brain and arachnoid (the middle of three layers of tissue that surround your brain). This is a medical emergency.
  • An abnormality in a blood vessel in your brain or in a blood vessel that supplies blood to your brain.
  • A tumor, either malignant (cancerous) or benign (noncancerous)
  • An obstruction in the flow of cerebrospinal fluid, which cushions and nourishes your brain and spinal cord.
  • A sinus infection.
  • A structural problem in your head, neck, or spine.

What is an exertion headache?

Exertion headache is another name for an exercise headache. Primary exercise headaches used to be called primary exertional headaches or benign exertional headaches.

Though the reasons for your post-workout headache might not always be clear, there are several possibilities.

Exertion headache

Another name for exercise headache, these may be triggered by temporary changes to the blood vessels in your brain during exercise. When you work out, your body, including your brain, has higher demands for oxygen-rich blood. Your blood vessels widen to allow more blood to flow through them. It’s possible that when the blood vessels in your brain widen, they create pressure in your skull, leading to a headache.

Headaches and dehydration

You become dehydrated when your body loses more water than it takes in. That can happen during exercise or other physical activity if you sweat heavily and drink too little fluid to make up for what you've lost. Dehydration causes your brain to shrink and pull away from your skull. That puts painful pressure on your nerves, triggering a headache after exercise. You can ease the pain by drinking water or other fluids.

Electrolyte imbalance

Electrolytes are minerals, such as potassium, calcium, and sodium, that play important roles in your health. You get most of them from your diet. They balance the fluids in your body, keep your heart beating normally, and help your nerves and muscles function properly. Your electrolytes can become unbalanced by exercise because they leave your body when you sweat. An exercise headache is just one symptom of an electrolyte imbalance. Other symptoms include:

  • Confusion
  • Constipation or diarrhea
  • Fast or erratic heartbeat (called an arrhythmia)
  • Fatigue
  • Irritability
  • Muscle discomfort, such as cramps, spasms, or weakness
  • Nausea and vomiting
  • Numbness

Low blood sugar

Glucose, or blood sugar, provides most of the energy needed to power your body, including your brain. You can burn through it during your workout. When you have low blood sugar, a condition called hypoglycemia, you may develop a headache. Hypoglycemia is much more common in people who have diabetes. Juice, regular (not diet) soda, and other sugary drinks or foods can quickly restore your blood sugar. If your workout is super intense, though, the opposite can happen — activities such as heavy weightlifting, sprinting, and competitive sports raise your adrenaline, which in turn causes a spike in your blood sugar, which is called hyperglycemia. This, too, can cause an exercise headache.

Headache from overexertion

You can exert yourself physically in ways other than exercise and end up with a headache. These headaches typically develop when you engage your abdominal (stomach) muscles or increase pressure in your chest. This can happen in several situations, such as:

  • Straining when you poop
  • Lifting heavy things
  • Coughing and sneezing
  • Having sex

These headaches usually don’t last more than a few minutes. However, if you keep up the exertion, the headache can get worse and last longer.

Heat exhaustion

Your body has a built-in cooling system that produces sweat when your body temperature rises above normal. This happens during exercise. If your body can’t cool itself enough, your increased temperature can trigger heat exhaustion.

One symptom is, you guessed it, a headache. Other symptoms of heat exhaustion include:

  • Dizziness or fainting
  • Fast heartbeat
  • Loss of coordination
  • Mild, short-lived confusion
  • Muscle cramps or weakness
  • Nausea and vomiting
  • Rapid breathing
  • Sweating heavily

You’re more likely to experience heat exhaustion if you are dehydrated as well. Other contributing factors include:

  • Being out of shape
  • Drinking alcohol before exercise
  • Obesity
  • Working out in a hot environment that you’re not used to

Certain medications and health conditions also can make heat exhaustion more likely. Ask your doctor whether your current health and prescriptions could put you at risk.

Environmental factors

Working out in certain conditions can also make an exercise headache more likely. These include:

  • A hot and humid setting
  • High altitudes if you’re not used to it
  • Places with strong odors from chemicals, such as cleaning products, or perfumes
  • Outdoors if you’re sensitive to allergens such as pollen, which can cause hay fever headaches
  • Smoke from incense, which some yoga studios burn
  • Smog or other forms of air pollution

Fortunately, you can take steps to lessen your chances of a painful exercise headache.

Stay hydrated

Dehydration can trigger exercise headaches, so make sure to drink plenty of fluids before and during your workout. Here are some guidelines:

  • About 2 to 3 hours before you exercise, drink 17 to 20 ounces of water.
  • About 20 to 30 minutes before you exercise, drink 8 ounces of water.
  • After every 10 to 20 minutes of exercise, drink 7 to 10 ounces of water.
  • Within 30 minutes of finishing your exercise, drink 8 ounces of water.

Consider sports drinks if your exercise will be very intense and longer than an hour. These drinks contain potassium, calories, and nutrients that can support longer workouts.

Keep electrolytes balanced

You can get a headache after exercise if your electrolytes become unbalanced. Electrolytes are minerals, such as potassium, calcium, and sodium, that play important roles in your health, including helping your muscles work correctly. You get most electrolytes from your diet, and they leave your body when you sweat.

Staying hydrated with water can help you maintain a proper electrolyte balance. You likely won’t have to worry about losing too many electrolytes during workouts of less than an hour. However, if you plan to exercise longer, stay hydrated with a sports drink that contains electrolytes.

If you sweat out a lot of salt, you should have either a sports drink or water along with a salty snack before a workout. To find out if you sweat out salt while working out, check your skin and clothes for a salty residue while you exercise or after you’re done.

You also can maintain an electrolyte balance by eating a diet rich in nutrients, including:

  • Vegetables and leafy greens
  • Nuts and seeds
  • Legumes
  • Dairy
  • Some fish and other seafood
  • Lean meats

Other steps to prevent an exercise headache

  • Avoid exercising in hot and humid conditions.
  • Avoid exercising at high altitudes if you’re not accustomed to doing so.
  • Warm up before you do a really tough workout.
  • Cool down after you exercise.
  • Get adequate rest daily, including 8 hours of sleep.
  • Eat a nutritious diet, avoiding processed foods and preservatives.

Take note of the exercises you were doing when your headache started. If you get a headache each time you do those exercises, try something different to see whether or not it causes an exercise headache.

A headache after exercise can be a pain, but it rarely means something’s wrong with your health. Instead, it may simply mean you need to drink more water, exercise in cooler conditions, or another factor that can be changed. However, if you have not had an exercise headache or it comes on very suddenly, it’s best to call your doctor right away to make sure it’s nothing serious.

Is it good to exercise when you have a headache?

If you develop a headache when exercising, it may get worse if you continue to exercise. 

When I exercise, will my headache go away?

It's possible. Regular exercise can help relieve tension and prevent headaches.

Which exercise is best for a headache?

Moderate exercise, such as swimming, cycling, and walking, can help with headaches. Aim for 30 minutes a day, 5 days a week.

What pressure points get rid of a headache?

There are a few pressure points that may help ease your headache:

  • The back of your hand, in the web between your thumb and index finger.
  • On both sides where the back of your neck meets your skull. The spot will feel like a little pool or depression.
  • On your face, right between your eyebrows and above your nose.
  • On your face, right above the inner corner of each eye. You will feel a small depression near the inner edge of your eyebrows.

Is it good to rest when you have a headache?

Yes. Resting in a cool, dark room can help ease your headache.