Constipation and Headaches: Links, Causes, Treatments

Can Constipation Cause Headaches or Vice Versa?

Constipation may cause headaches in people who have certain medical conditions. While headaches and constipation are common disorders on their own, some studies indicate they may occur together.

This article discusses the link between headaches and constipation in certain medical conditions, such as irritable bowel syndrome (IBS), fibromyalgia, celiac disease, mood disorders, and chronic fatigue syndrome.

Can Constipation Cause Headaches?

Violeta Stoimenova / Getty Images

Headaches and Constipation

Researchers believe constipation may play a key role in starting a headache, or possibly that both headaches and constipation share a common trigger that causes the body to react.

A small 2015 study of children and adolescents found that for participants already diagnosed with tension-type headaches, the prevalence of constipation was 25%, which is higher than in the general population. Researchers noted that treating constipation issues typically improved headaches as well.

What Exactly Is Constipation?

Constipation is described as not having a bowel movement, or passing stool, for three or more days. Constipation causes abdominal pain and stool that is hard, dry, and difficult or even painful to pass. Occasional constipation can happen to anyone for many reasons, including not drinking enough water, dietary issues, and even stress.

Severe constipation can become a medical emergency. If you have extreme abdominal cramps, vomiting, and blood in your stool, seek immediate medical attention.

Conditions With Both Headaches and Constipation

There are several conditions with known links to both headaches and constipation.

Irritable Bowel Syndrome (IBS)

It has been estimated that people with irritable bowel syndrome have as much as 60% higher odds of having migraines.  In two studies of people with IBS, 34%–50% reported chronic headaches. Women are more likely than men to be affected by both conditions at the same time.

Stress also has an impact on the severity of both migraines and IBS. Researchers are exploring whether some people have a more hyperactive stress response that causes these conditions to occur together.

The nervous system may be the common link between IBS and migraine. Serotonin, a brain chemical known as a neurotransmitter, which is present in both the brain and the gut, seems to play a role in both IBS and migraines.


Fibromyalgia and IBS are often comorbid conditions, meaning that they occur together.

Fibromyalgia is a condition that includes full-body aches and pain, tenderness to the touch in some areas, fatigue, sleep disturbance, and headaches. Several studies have reported fibromyalgia and migraine occurring together in 18% to 35.6% of people.

IBS symptoms can include chronic constipation. Researchers have noticed that as the severity of constipation increases, the symptoms of fibromyalgia seem to worsen in people. Further, the low-grade inflammation that constipation causes may actually trigger fibromyalgia.

Celiac Disease

Celiac disease is a genetic autoimmune disorder that affects 1% of the population.

In celiac disease, when gluten (the protein found in wheat, rye, and barley) is eaten, the body mounts an immune response. White blood cells, designed to fight foreign invading viruses and bacteria, begin attacking the small intestine by mistake. This can shrink or eliminate the villi—tiny fingerlike projections that absorb nutrients along the walls of the small intestine.

People with both celiac disease and non-celiac gluten sensitivity can have many gastrointestinal symptoms, including chronic diarrhea, malabsorption of nutrients, and chronic constipation.

Researchers suggest that constipation occurs with celiac disease because of reduced intestinal movement due to inflammation in the mucosal lining of the intestines.

Researchers have also noted that people with celiac disease can have headaches either at the time of diagnosis or as the illness continues to develop. The headaches can be migraine or unspecific. There are theories about what causes neurological symptoms in people with celiac disease, but more research is needed. 

Mood Disorders

Studies have consistently linked mood and anxiety disorders with functional gastrointestinal (GI) disorders, which include persistent and recurring GI symptoms like constipation. The rate of patients with both mood and anxiety disorders and functional GI disorders is much higher than the general population, with rates as high as 50% in some cases.

Studies on constipation in adults show psychological factors have an impact. One study showed that constipated adults have higher psychological distress. Another study showed a 65% rate of common psychological diagnoses—including anxiety, depression, and panic disorders—among patients with constipation.

It appears that anxiety, depression, panic disorder, and post-traumatic stress disorder (PTSD) often occur before an episode of constipation, or they may occur at the same time.

Another study showed that 24.6% of people with depression reported having disordered bowel issues, with chronic constipation being more common than in people without depression.

Chronic Fatigue Syndrome

Chronic fatigue syndrome (CFS), a disorder characterized by extreme fatigue lasting at least six months, often co-occurs with irritable bowel syndrome.

Researchers think there is a link between an altered gut microbiome, which is the system of microorganisms that occur naturally in the intestinal tract, and CFS. Several studies indicate that the intestinal microbiome is abnormal in patients with chronic fatigue syndrome.

Migraine headaches appear to be much more common in people with CFS. One study found that 85% of people with CFS reported migraine headaches compared to only 5% of people without CFS.

Other Possibilities

There are other issues that can cause both constipation and headaches, including:

  • Dehydration: Not drinking enough fluids can slow the absorption of water in the colon and create dry, difficult-to-pass stool.
  • Medications: Both opioids and antidepressants are medications that can cause constipation. Opioids are often prescribed after surgery, so speak with your healthcare provider if you are experiencing constipation following a procedure. Often a medical provider may prescribe or recommend a stool softener or laxative.
  • Sedentary lifestyle: People who have a sedentary job or generally aren't able to move much may experience constipation.
  • Highly processed foods: Eating low-fiber or highly processed foods may not provide enough fiber, causing constipation.


In most cases, constipation and headache can be managed at home with simple remedies.

Constipation Treatment

Treatment for constipation includes:

  • Consume more fiber: Getting more fiber by eating fresh fruits and a colorful array of vegetables can help reduce constipation. You can also consider fiber supplements. Be sure to discuss taking supplements with a healthcare provider beforehand to ensure they will not interfere with other medications.
  • Drink more water: Because water is absorbed by the colon, drinking sufficient amounts of water daily may improve constipation. Aim for 64 ounces (8 cups) per day. Setting a reminder can help you drink enough fluids throughout the day.
  • Movement: Moving more can help with constipation. If you have difficulty exercising due to medical or other issues, start with small bouts. Walking to the mailbox, walking in place while watching television, or walking around a neighborhood, local track, or park can add additional, low-impact movement that may help reduce constipation.

Migraine Treatments

Treatment for migraines includes:

  • Medications: Over-the-counter products like Excedrin Migraine or ibuprofen can help treat migraines. If these do not relieve migraine pain, drugs like triptans may be prescribed.
  • Rest: Lying down in a dark, quiet room may help relieve migraine pain
  • Cold packs: Sometimes applying a cold pack to the forehead can help with migraines
  • Managing stress: Stress can be a trigger for migraines. Reducing stress or implementing coping skills to manage stress once it starts, can be helpful in managing migraines. Try deep breathing, meditation, and getting outside.
  • Reducing caffeine: Blood vessels seem to be sensitive to caffeine. Consuming too much or changing the usual amount you consume can trigger migraines.

Talk to Your Healthcare Provider

If you’re having migraines and constipation at the same time, see a healthcare provider to determine their cause. Both headache and constipation are common symptoms that cause significant pain and discomfort, resulting in reduced function and diminished quality of life. Talk with a healthcare professional, especially if symptoms are getting worse or impacting your quality of life.


People may experience constipation and headaches or migraines at the same time. These conditions occurring simultaneously may be an indication of another health issue. Several conditions are linked to both headaches and constipation, including irritable bowel syndrome, fibromyalgia, and celiac disease.

A Word From Verywell

Both migraines and constipation are treatable conditions. Once you find the source of your triggers, you will find these conditions are easier to treat. If you are having severe symptoms of either constipation or migraines, seek medical attention for relief and to rule out more serious illnesses or diseases.

Frequently Asked Questions

  • What does constipation feel like?

    Constipation may feel like a sense of fullness. You may have a feeling of needing to pass a bowel movement but are not able to. You may experience bloating and abdominal pain as well. Constipation can also cause you to lose your appetite and feel sluggish or lethargic, as though your energy is low.

  • How long does constipation last?

    If a person has fewer than three bowel movements per week, that is technically considered constipation. Constipation can last several days, but if it's coming close to a week and you still haven't had a bowel movement, it's important to seek medical attention. Your healthcare provider can prescribe laxatives, over-the-counter remedies, or other treatment recommendations based on your medical history. The longer a person is constipated, the riskier the condition becomes. Severe constipation can lead to an impacted bowel or worse, bowel obstruction, a serious issue requiring immediate medical attention.

  • How do you relieve constipation?

    There are several ways to relieve constipation. These can include increasing water intake and eating more fiber. Fruits like apples and peaches may be helpful in relieving constipation.

  • How long does a migraine last?

    A migraine can last anywhere from four hours to several days. If your pattern of migraines worsens, it's important to seek medical attention. You need to seek immediate, emergency medical attention if your migraine can be described as “the worst headache of my life," or if you are having vision problems, slurred speech, mental confusion, or seizures.

  • How do you relieve a migraine?

    One way to relieve migraines is with over-the-counter pain relievers such as Advil and Motrin, Aleve (naproxen sodium), or Excedrin Migraine. Other solutions include ice packs, resting in a dark and quiet room, applying pressure to your temples, and massaging your head and neck.

18 Sources
Verywell Health uses only high-quality sources, including peer-reviewed studies, to support the facts within our articles. Read our editorial process to learn more about how we fact-check and keep our content accurate, reliable, and trustworthy.
  1. Park MN, Choi MG, You SJ. The relationship between primary headache and constipation in children and adolescents. Korean J Pediatr. 2015;58(2):60. doi:10.3345/kjp.2015.58.2.60

  2. Rezaeiashtiani A, Jadidi A, Khanmohammadi-Hezaveh A, et al. Is the treatment of constipation can relieve the migraine symptoms? A randomized clinical trial study. J Pediatr Neurosci. 2019;14(4):186. doi:10.4103/jpn.JPN_19_19

  3. National Institute of Diabetes and Digestive and Kidney Diseases. Constipation.

  4. Bin Abdulrahman KA, Alenazi NS, Albishri SB, Alshehri FF. Association of migraine and irritable bowel syndrome in Saudi Arabia: A nationwide surveyBiomed Res Int. 2022;2022:8690562. doi:10.1155/2022/8690562

  5. Cámara-Lemarroy CR, Rodriguez-Gutierrez R, Monreal-Robles R, Marfil-Rivera A. Gastrointestinal disorders associated with migraine: A comprehensive reviewWorld J Gastroenterol. 2016;22(36):8149-8160. doi:10.3748/wjg.v22.i36.8149

  6. Neumeister MW, Neumeister EL. FibromyalgiaClin Plast Surg. 2020;47(2):203-213. doi:10.1016/j.cps.2019.12.007

  7. Whealy M, Nanda S, Vincent A, Mandrekar J, Cutrer FM. Fibromyalgia in migraine: a retrospective cohort studyJ Headache Pain. 2018;19(1):61. doi:10.1186/s10194-018-0892-9

  8. Mansız-Kaplan B. Ab0905 may chronic constipation-induced chronic inflammation affect the onset and severity of fibromyalgia symptoms? Ann Rheum Dis. 2019;78(Suppl 2):1919-1919. doi:10.1136/annrheumdis-2019-eular.983

  9. Çakir M, Cezaroğlu S, Çobanoğlu Ü. Celiac disease in children with chronic constipation. Turk J Med Sci. 2016;46:651-656. doi:10.3906/sag-1502-130

  10. Qasim H, Nasr M, Mohammad A, Hor M, Baradeiya AM. Dysbiosis and migraine headaches in adults With celiac diseaseCureus. 2022;14(8):e28346. doi:10.7759/cureus.28346

  11. Hosseinzadeh ST, Poorsaadati S, Radkani B, Forootan M. Psychological disorders in patients with chronic constipationGastroenterol Hepatol Bed Bench. 2011;4(3):159-163.PMID: 24834176

  12.  Ballou S, Katon J, Singh P, et al. Chronic diarrhea and constipation are more common in depressed individuals. Clin Gastroenterol Hepatol. 2019;17(13):2696-2703. doi:10.1016/j.cgh.2019.03.046

  13. Kenyon JN, Coe S, Izadi H. A retrospective outcome study of 42 patients with chronic fatigue syndrome, 30 of whom had irritable bowel syndrome. Half were treated with oral approaches, and half were treated with faecal microbiome transplantation. Hum Microbiome J. 2019;13:100061. doi:10.1016/j.humic.2019.100061

  14. Ravindran MK, Zheng Y, Timbol C, Merck SJ, Baraniuk JN. Migraine headaches in chronic fatigue syndrome (CFS): comparison of two prospective cross-sectional studiesBMC Neurol. 2011;11:30. Published 2011 Mar 5. doi:10.1186/1471-2377-11-30

  15. Harvard Health. What to do when medication makes you constipated.

  16. National Institute of Neurological Disorders and Stroke. Migraine.

  17. Cleveland Clinic. Constipation.

  18. Cleveland Clinic. Migraine headaches.

By Michelle C. Brooten-Brooks, LMFT
Michelle C. Brooten-Brooks is a licensed marriage and family therapist, health reporter and medical writer with over twenty years of experience in journalism. She has a degree in journalism from The University of Florida and a Master's in Marriage and Family Therapy from Valdosta State University.