Why Does My Stomach Hurt When I’m Anxious?

Anxiety causes stomach pain because your brain and your digestive system are directly wired together through a massive network of nerves. When you feel anxious, your brain triggers a stress response that physically changes how your gut moves, how much acid it produces, and how sensitive it is to pain. That “pit in your stomach” feeling isn’t imaginary. It’s a real physiological event happening in your digestive tract.

Your Gut Has Its Own Nervous System

Your digestive tract contains more than 100 million nerve cells lining the path from your esophagus to your rectum. Scientists call this the enteric nervous system, and it’s often referred to as a “second brain.” It can’t think or reason, but it constantly communicates back and forth with your actual brain, and that two-way conversation has powerful physical consequences.

The main communication highway between these two systems is the vagus nerve, which runs from your brainstem down to your abdomen. Under normal conditions, signals traveling down the vagus nerve help coordinate stomach muscle contractions, acid secretion, and the pace at which food moves through your system. It continuously fine-tunes the relaxation and contraction of smooth muscle in your stomach to control grinding, digestion, and emptying.

When you’re anxious, your brain releases stress chemicals that suppress vagus nerve activity. With that coordination disrupted, your stomach doesn’t empty properly, muscles contract irregularly, and acid production shifts. The result is pain, cramping, nausea, or that heavy, unsettled feeling you recognize as a “nervous stomach.”

What Stress Hormones Do to Your Digestion

Anxiety activates your fight-or-flight response. Your body floods with cortisol and adrenaline, hormones designed to prepare you for physical danger. These hormones redirect blood away from your digestive organs and toward your muscles, heart, and lungs. Digestion, in evolutionary terms, isn’t a priority when you’re running from a threat.

This redirection creates a cascade of digestive problems. Cortisol increases stomach acid production, which can cause a burning or gnawing sensation. At the same time, digestion slows down as blood flow to the gut drops, leading to bloating and cramping as food sits longer than it should. The effect on your bowels can go either direction: anxiety may speed up intestinal contractions (causing diarrhea and urgency) or slow them down (causing constipation). Some people alternate between both.

The protective lining of your stomach also takes a hit. Under normal vagus nerve signaling, your stomach produces bicarbonate to neutralize acid and protect the mucosal lining. When stress suppresses that signaling, less bicarbonate gets produced, leaving your stomach lining more exposed to its own acid. That’s one reason chronic anxiety can make your stomach feel raw or irritated even when you haven’t eaten anything unusual.

The Gut Talks Back to the Brain

This connection runs in both directions. Your gut doesn’t just receive stress signals; it sends them. When the digestive system is irritated, it can relay signals back to the central nervous system that trigger mood changes. This helps explain why people with conditions like irritable bowel syndrome often experience anxiety or depression alongside their digestive symptoms. It’s not that one simply causes the other. They amplify each other in a feedback loop.

Repeated stress also alters the composition of bacteria living in your gut. These changes in gut microbiota affect the production of certain chemical messengers and inflammatory molecules. Over time, chronic anxiety can weaken the intestinal barrier, allowing substances that normally stay contained in the gut to leak into the bloodstream. This increases inflammation, which can worsen both digestive discomfort and mood.

Why Some People Feel It More Than Others

Not everyone gets the same stomach symptoms from anxiety. Research on people with functional dyspepsia (chronic indigestion without a clear structural cause) shows that their vagus nerve activity drops more sharply after mental stress than it does in healthy controls. Psychological factors account for a substantial portion of that reduction. In practical terms, this means some people’s gut-brain wiring is more reactive to stress, leading to more pronounced symptoms like delayed stomach emptying and reduced muscle movement in the lower stomach.

Your baseline gut health matters too. If you already have a sensitive digestive system, mild anxiety can push symptoms over the threshold into noticeable pain. People with IBS, for instance, often find their flare-ups track closely with periods of high stress. The gut isn’t creating a new problem; anxiety is turning up the volume on a vulnerability that already exists.

How to Calm Your Gut During Anxiety

Because the vagus nerve is the central player in this process, techniques that reactivate it can directly reduce gut symptoms. Diaphragmatic breathing is one of the most effective and immediate tools. When you breathe deeply using your diaphragm (expanding your belly rather than your chest), you physically stimulate the vagus nerve. This triggers your body’s relaxation response and dials down the stress response. It’s been shown to help manage symptoms of IBS, chronic pain, and anxiety.

To practice: place one hand on your chest and one on your belly. Breathe in slowly through your nose for about four seconds, letting your belly push outward while your chest stays relatively still. Exhale slowly for six to eight seconds. Even two to three minutes of this can shift your nervous system away from fight-or-flight and toward a calmer state where digestion can resume normally.

Other approaches that help over time include regular physical activity, which lowers baseline cortisol levels, and reducing caffeine and alcohol, both of which independently increase stomach acid. If your anxiety is persistent, addressing it directly through therapy or other structured support often improves digestive symptoms as a side effect, precisely because the two systems are so intertwined.

When Stomach Pain Isn’t Just Anxiety

Anxiety-related stomach pain typically comes and goes with your stress levels. It often shows up before a stressful event, during periods of worry, and fades when you feel calmer. It doesn’t usually produce “red flag” symptoms that point to something more serious.

Signs that your stomach pain may need further evaluation include:

  • Blood in your stool, urine, or vomit
  • Unexplained weight loss
  • Diarrhea that wakes you up at night
  • A fever that doesn’t resolve on its own
  • Persistent nausea or vomiting
  • Swelling or tenderness in your abdomen
  • Yellowing of your skin or eyes

If you’ve been having vomiting and diarrhea for about a week, that pattern points more toward a viral or bacterial infection than anxiety. And if you’re over 60 and notice a sudden change in your digestive patterns, that warrants a closer look from a gastroenterologist. Stress-related stomach pain, while genuinely uncomfortable, generally doesn’t produce these warning signs. If yours does, the cause is likely something beyond anxiety alone.