provider image
Welcome! You’re in GoodRx for healthcare professionals. Now, you’ll enjoy a streamlined experience created specifically for healthcare professionals.
Skip to main content
HomeHealth ConditionsHeadaches

Is Your Anxiety Causing Your Headaches?

Jessica BrownPatricia Pinto-Garcia, MD, MPH
Published on June 3, 2024

Key takeaways:

  • Anxiety is associated with certain types of headaches, including tension headaches, migraines, and cluster headaches.

  • The relationship between headaches and anxiety is complex. Anxiety can cause headaches, and living with headaches can cause anxiety.

  • There are many ways to treat and prevent headaches related to anxiety, including medication, psychotherapy, lifestyle changes, and home care.

Woman with a worried look sitting alone on a bed
Kiwis/iStock via Getty Images Plus

Anxiety is closely connected to headaches. It’s one of the causes of tension headaches and has been linked to migraines and cluster headaches.

But does anxiety cause headaches? Surprisingly, the answer isn’t always clear. That’s because anxiety and headaches have a two-way relationship. Anxiety can cause headaches, and having headaches can cause anxiety

Experts still have a lot to learn about how one influences the other. But the good news is that there are several ways to treat both anxiety and headaches. 

Three types of headaches linked to stress

Three types of headaches are linked to stress: tension headaches, migraines, and cluster headaches. Below, we go into each one in more detail.

Tension headaches

Tension headaches are the most common type of headache. They’re usually triggered when muscles in the neck and scalp become tense. This can be caused by stress, depression, or anxiety. 

Tension headaches cause dull, consistent pain on both sides of your head. It can feel like there’s a tight band around your forehead. The symptoms are usually mild, though tension headaches can sometimes cause severe pain. 

Tension headaches can last from 30 minutes to 7 days. They can occur occasionally or frequently — sometimes daily. 

Migraines

02:17
Featuring Noah Rosen, MD
Reviewed by Sarah Gupta, MD | March 6, 2025

Migraine is a disorder that affects your nervous system and causes severe throbbing headaches, along with other symptoms. They can last a few hours to a few days. 

Stress is one of the most common migraine triggers that people report. Studies have shown that people who were exposed to stress early in life are more likely to have migraines. These migraines are most likely from depression or anxiety that the stress caused. People who’re experiencing stress in their lives are also likely to have migraines. 

But the connection goes both ways. People who have migraines are much more likely to have an anxiety disorder, especially if their migraines are chronic (frequent). Often, migraines develop before an anxiety disorder. 

Cluster headaches

Cluster headaches are an uncommon, severe type of headache. They cause pain behind and around the eyes. As the name suggests, these headaches occur in clusters, with pain attacks coming one to eight times a day. They can last anywhere from 15 minutes to 3 hours. 

Cluster headaches can be chronic. Or they can last for a period of weeks to months, with headache-free periods between episodes. 

GoodRx icon

Why does anxiety cause headaches?

Tension headaches occur when the muscles in your face and neck contract and tense up — a common response to stress and anxiety.

Chronic anxiety can cause the release of stress hormones, like epinephrine and cortisol. These hormones can affect heart rate, blood pressure, and other body functions that may be related to migraines. 

Anxiety disorders can also lead to migraines indirectly. For example, if your anxiety makes it hard for you to fall asleep, poor sleep can trigger migraines. Unfortunately, the worry about getting a migraine itself can cause a migraine. So you can get stuck in a cycle of stress and migraines.

How do you treat a stress headache?

How do you relieve tension headaches?

You can get relief from tension headaches by taking a nonsteroidal anti-inflammatory drug (NSAID), like ibuprofen and naproxen. If you’re unable to take NSAIDs or prefer to avoid them, acetaminophen (Tylenol) is also helpful.

Studies show that caffeine may make both types of medication more effective. Consider having a caffeinated drink such as coffee or tea or taking a headache reliever that contains caffeine, like Excedrin.

Medications for migraine headaches

Treatment options for migraines vary, depending on how severe they are. If your migraines are infrequent or only mild to moderate, you may find relief just by taking NSAIDs. And like tension headaches, consuming caffeine may help the medication work better. 

But if you get frequent or moderate to severe migraines, your healthcare professional may prescribe stronger medications such as triptans. Examples of triptans are zolmitriptan (Zomig) and sumatriptan (Imitrex). 

How to treat cluster headaches

Two types of treatments are recommended for cluster headache attacks: oxygen therapy and medication. 

During oxygen treatment, you use an oxygen tank and a cannula that fits into your nostrils. It delivers oxygen to you for 15 to 20 minutes. 

Cluster headaches are also treated with triptans in nasal or injection forms.

Treating the anxiety behind your headaches

If you have ongoing anxiety, treating the anxiety may help your headaches. You can do this through therapy, with medications, and with relaxation techniques. 

Psychotherapy

Your healthcare professional may recommend therapy, such as cognitive behavioral therapy (CBT). The goal of CBT is to address your thoughts and behaviors that lead to anxiety. 

Other types of therapy, such as acceptance and commitment therapy (ACT), may be helpful if you have cluster headaches. This therapy teaches you how to accept and work around your symptoms.

Anxiety medications

Certain antidepressant medications can help with anxiety. In certain situations, your healthcare provider may prescribe them. 

Home treatments

If you have anxiety or stress, it may be helpful to do stress-reducing activities like yoga or deep-breathing exercises. Or you can do anything that’s relaxing to you. This could be any type of activity like socializing, exercising, or reading. 

How to prevent a stress headache?

Making lifestyle changes that reduce tension and anxiety can help you avoid stress headaches. These include:

  • Getting enough sleep. Ideally, you should get in bed and wake up at the same time every day.

  • Eating and drinking water regularly.

  • Avoiding your headache triggers, which vary from person to person. Examples of triggers include bright light, dehydration, strong odors, and foods such as chocolate, dairy, and artificial sweeteners.

  • Getting regular physical activity.

  • Practicing stress-reduction techniques such as yoga, meditation, and deep breathing.

When should you talk to your doctor about stress headaches?

The occasional tension headache can often be treated at home. But you should see a healthcare professional if they last for long periods of time, strike often, or interfere with your daily life. In these situations, you may need to take medication to help prevent and treat them.

See a healthcare professional for migraines if you:

  • Get them more than four times a month

  • Treat them more than twice a week

  • Aren’t getting relief from over-the-counter (OTC) medication

Always visit your healthcare professional if you think you have cluster headaches. 

The bottom line

Anxiety and certain types of headaches — tension headaches, migraines, and cluster headaches — often go hand in hand. Their exact relationship isn’t well understood, though. It’s possible that anxiety is causing your headaches. But headaches can also cause anxiety. Treatment includes addressing both the headache symptoms and your anxiety through a combination of medication, therapy, and stress-reducing activities.

why trust our exports reliability shield

Why trust our experts?

Jessica Brown
Written by:
Jessica Brown
Jessica Brown is an experienced writer and editor who specializes in health and medicine. She began her career in the magazine industry.
Laurie Tarkan
Edited by:
Laurie Tarkan
Laurie Tarkan is a senior health editor for general health and well-being at GoodRx. She has an extensive background in health journalism, and wrote regularly for The New York Times for a decade.
Patricia Pinto-Garcia, MD, MPH
Patricia Pinto-Garcia, MD, MPH, is a medical editor at GoodRx. She is a licensed, board-certified pediatrician with more than a decade of experience in academic medicine.

References

American Migraine Foundation. (2018). The link between migraine, depression, and anxiety

Kumar, R., et al. (2022). The development and impact of anxiety with migraines: A narrative review. Cureus

View All References (4)

Lipton, R. B., et al. (2017). Caffeine in the management of patients with headache. The Journal of Headache and Pain

Pohl, H., et al. (2020). Cluster headache and anxiety: Results of the EUROLIGHT cluster headache project – an Internet-based, cross-sectional study of people with cluster headache. Clinical and Translational Science

Shah, N., et al. (2023). Muscle contraction tension headache. StatPearls

Stubberud, A., et al. (2021). Is there a causal relationship between stress and migraine? Current evidence and implications for management. The Journal of Headache and Pain.

GoodRx Health has strict sourcing policies and relies on primary sources such as medical organizations, governmental agencies, academic institutions, and peer-reviewed scientific journals. Learn more about how we ensure our content is accurate, thorough, and unbiased by reading our editorial guidelines.

Was this page helpful?

Get the facts on Headaches.

Sign up for our newsletter to get expert tips on condition management and prescription savings.

By signing up, I agree to GoodRx's Terms and Privacy Policy, and to receive marketing messages from GoodRx.

Related Articles