Skip to main content
Medically Approved

What causes a headache after working out?

twitter share buttonfacebook share buttonlinkedin share buttonemail article button
CausesHow long do they last?TreatmentPreventionSummary
Headaches after working out might be caused by dehydration or sun exposure, among other causes. There are a host of treatment and prevention options for each cause.
Medically reviewed by Daniel Bubnis, M.S., NASM-CPT, NASE Level II-CSS
Updated on

If you get a headache after working out, you’re not alone.

Medical literature suggests this is an under-researched and often misunderstood condition.

Several factors could cause a headache after exercise, including dehydration, overexposure to the sun, low blood sugar, and a rare form of headache called exertional headache

In general, it’s a matter of body science: When you work out, your veins and arteries expand to allow more blood flow, which in turn creates more pressure in the skull and can cause a headache.

While it’s not abnormal to get a headache after working out, it’s important to identify and address the root cause. 

Causes

A person in a gym wearing workout clothes leaning on a bar on a squat rack.
Photography by Oleg Breslavtsev/Getty Images

Dehydration

When you sweat, you lose fluid and can quickly become dehydrated. The reason this causes a headache is not known precisely, though it may be due to a shift in fluid out of the brain that stimulates pain receptors in the lining around the brain. 

This headache may intensify if you bend down and is characterized by an all-over pain or pain localized to the front or back of the head.

Blood sugar

Physical activity lowers your blood sugar. Also known as hypoglycemia, low blood sugar causes the body to kick into high gear, increasing blood flow to the brain. This change in blood flow is what causes a headache.

This type of headache is often described as a dull, throbbing pain in the side of the temples. 

Man on phone in bed

100% online care

Treatment plans in 15 minutes or less for 40+ conditions.

Start consult now

Sun exposure

If your workouts take you out into the sun, your headache may not be a matter of exercise but of over-exposure to the sun. That’s because some people have higher degrees of light sensitivity. 

For these people, sunlight — especially suddenly going from darkness to light — can trigger the release of chemicals in the brain that cause a headache.

Exertion headache

If the above situational causes can be ruled out, you could have a rare type of headache called exertional headache, or primary exercise headache

What is known about exertion headaches is that they occur only during or after some kind of physical activity and are likely caused by a narrowing of the blood vessels during exercise.

The type of activity that induces exertional headache varies from person to person. Even an extreme coughing fit or straining to have a bowel movement can cause exertional headaches. 

It’s commonly described as a pulsating feeling that occurs on both sides of the head.

How long does it last?

Headaches from dehydration or sun exposure should go away within an hour or two after drinking fluids or having a break from the sun. Prolonged or severe dehydration may take several hours to resolve. 

Similarly, low blood sugar headaches should be remedied shortly after eating or drinking something. Exertional headaches usually last from 5 minutes to up to 48 hours. Note that exertion headaches generally only last for a period of 3 to 6 months, and then they stop occurring. 

Treatment

Treatment really depends on the cause. For dehydration headaches, it is recommended to drink 16 to 32 ounces of water, followed by lying down for a while. Maintaining good hydration in day-to-day life (drinking more than 2 liters of water daily) can also help stop these headaches.

Blood sugar can be regulated with simple carbohydrates, such as juice or a piece of fruit, followed by complex carbohydrates.

If sun exposure is the issue, lying down in a shaded place or inside will help. Just be sure not to go from bright light to completely dark.

There are also drug options that can help to manage the pain symptoms if headaches linger. Nonsteroidal anti-inflammatory drugs, such as naproxen (Aleve) or ibuprofen (Advil), can help treat headaches. These medications are especially helpful for exertion headaches.

Note that if you experience exertion headaches, or headaches after working out that you can’t explain, you should see a healthcare professional. 

This is so they can rule out underlying conditions, such as an infection, or more serious conditions. These can include:

Though more serious conditions are unlikely, it is important to screen for them. 

Pill bottle with text 'Starts at $4'

Free prescription coupons

Seriously … free. Explore prices that beat the competition 70% of the time.

Get free card

Preventing headaches when working out 

Hydration is probably the best preventive measure for avoiding headaches after working out, regardless of the cause. 

Those with low blood sugar should be sure to have a meal or a snack within two hours of working out. It is recommended to avoid refined sugars and instead, choose protein and complex carbohydrates.

If you are sensitive to light, be sure to wear sunglasses or avoid exercising outdoors in the middle of the day. 

For exertion headaches, a good warmup regimen and an exercise program that builds in intensity over a period of a few months are recommended. It may also be a good idea to mix up your exercise regimen. 

Are there other forms of exercise you notice don’t lead to an exertion headache? Experiencing exertion headaches doesn’t mean you can never get back to your typical routine, but you may temporarily need to try something else until the condition passes.

Some research suggests taking medications just before exercising to prevent headaches, such as sumatriptan (Imitrex), ergotamine (Ergomar), or indomethacin (Indocin).

The same review study also says that you can try preventive treatment over the course of a few months, such as indomethacin, at a dose of 25–150 milligrams (mg) per day, or beta-blockers, like metoprolol (Lopressor) 1–2 mg/kg per day.

If you need help covering the cost of medications, Optum Perks’ free Discount Card could help you get up to 80% off prescription medication. See how much you can save on your medication here.

Summary

Headaches after working out can have various causes, including a rare form of headache called exertion headache. It’s important to see a healthcare professional to make sure the source of your headache isn’t a symptom of a more serious condition.

However, for situational headaches, for example, where you are dehydrated, treatment and prevention are fairly straightforward. Exertion headache is known to be temporary, lasting 3 to 6 months, and can be managed with prescription medications and other preventive measures.

Download the free Optum Perks Discount Card to save up to 80% on some prescription medications.

Article resources