An upset stomach can come from dozens of different sources, ranging from something you ate an hour ago to a chronic condition that’s been building for years. The most common causes fall into a few broad categories: infections, food reactions, medications, stress, lifestyle habits, and underlying digestive conditions. Understanding which category your symptoms fit into is the first step toward figuring out what to do about them.
Viral and Bacterial Infections
Viral gastroenteritis is the single most common cause of sudden stomach upset. Norovirus and rotavirus are the usual culprits, spreading through contaminated food, water, or close contact with someone who’s infected. Symptoms typically hit fast: nausea, vomiting, diarrhea, and cramping that last anywhere from one to three days. Most people recover on their own, though dehydration from fluid loss is the main risk to watch for.
Bacterial infections from organisms like Salmonella, E. coli, or Campylobacter tend to come from undercooked meat, unpasteurized dairy, or contaminated produce. These infections often cause more intense symptoms than viral ones, including fever and bloody stool in some cases.
Then there’s Helicobacter pylori, a bacterium that colonizes the stomach lining and causes chronic inflammation. Nearly 44% of adults worldwide carry this infection, according to a large analysis published in Gastroenterology covering data through 2022. Many people with H. pylori have no symptoms at all, but it’s the primary driver behind chronic gastritis and peptic ulcers. Eradicating the infection heals those conditions in most cases.
Food Intolerances and Allergies
If your stomach acts up after eating certain foods, you’re likely dealing with either a food intolerance or a food allergy. They sound similar but work differently in the body. A food allergy involves the immune system. Even a tiny amount of the trigger food can set off a reaction that goes beyond the gut, potentially causing hives, swelling, or in severe cases, anaphylaxis.
A food intolerance, on the other hand, is primarily a digestive problem. It happens when your body lacks the enzyme needed to break down a specific component of food. Lactose intolerance is the classic example: without enough lactase enzyme, the lactose in dairy products ferments in the gut and produces gas, bloating, cramps, and diarrhea. Fructose and gluten sensitivities follow a similar pattern. Additives like sulfites, commonly used to preserve dried fruit, canned goods, and wine, can also trigger digestive symptoms in sensitive people.
The key difference is dose. With an intolerance, you can often tolerate small amounts of the food without trouble. With a true allergy, even trace amounts can be dangerous.
Medications That Irritate the Stomach
Pain relievers like ibuprofen, aspirin, and naproxen are among the most frequent medication-related causes of stomach upset. These drugs, collectively called NSAIDs, work by blocking the production of compounds called prostaglandins, which drive inflammation and pain. The problem is that those same prostaglandins also protect the stomach lining. They regulate mucus production, blood flow to the stomach wall, and the repair of surface cells. When you suppress them, the stomach becomes significantly more vulnerable to its own acid.
With occasional use, this might mean mild nausea or heartburn. With regular use, it can lead to erosions, ulcers, and even gastrointestinal bleeding. Taking NSAIDs with food or using coated formulations can reduce but not eliminate this risk.
Antibiotics are another common offender. They disrupt the balance of bacteria in the gut, often causing nausea, bloating, or diarrhea during a course of treatment. Iron supplements, certain antidepressants, and blood pressure medications can also cause stomach discomfort as a side effect.
Stress and the Gut-Brain Connection
That “nervous stomach” feeling before a big presentation isn’t just in your head. Your digestive tract contains its own nervous system, called the enteric nervous system, made up of more than 100 million nerve cells lining the gastrointestinal tract from esophagus to rectum. This “second brain” constantly communicates with the brain in your skull, and that two-way connection means emotional distress can directly alter digestion.
When you’re anxious or stressed, your body shifts resources away from digestion. Stomach acid production changes, gut motility speeds up or slows down, and inflammation can increase. The result is real, physical symptoms: nausea, cramping, bloating, diarrhea, or a general sense that your stomach is “off.” This is why people with irritable bowel syndrome often notice their symptoms flare during stressful periods. Research from Johns Hopkins has shown that irritation in the GI system can also send signals back to the brain that trigger mood changes, creating a cycle where gut problems fuel anxiety and anxiety fuels gut problems. Cognitive behavioral therapy has shown promise in breaking that cycle for some people.
Chronic Digestive Conditions
When stomach upset keeps coming back, a chronic condition may be the underlying cause. The three most common are IBS, GERD, and inflammatory bowel disease.
Irritable Bowel Syndrome (IBS)
IBS is a functional disorder, meaning the gut looks structurally normal but doesn’t work the way it should. The intestinal muscles contract too frequently or not often enough, leading to abdominal pain, gas, bloating, and alternating bouts of constipation and diarrhea. It affects an estimated 10 to 15% of the global population and is more common in women. Triggers vary widely from person to person but often include certain foods, hormonal shifts, and stress.
Acid Reflux and GERD
Gastroesophageal reflux disease occurs when stomach acid regularly flows back into the esophagus. The hallmark symptom is a burning sensation in the chest or throat, but it can also cause nausea, upper abdominal discomfort, and a sour taste in the mouth. Eating large meals, lying down soon after eating, and consuming fatty or spicy foods tend to make it worse.
Inflammatory Bowel Disease (IBD)
Unlike IBS, inflammatory bowel disease involves visible, measurable inflammation in the digestive tract. Crohn’s disease and ulcerative colitis are the two main forms. Symptoms include persistent abdominal pain, diarrhea (sometimes bloody), fatigue, and weight loss. IBD is an autoimmune condition and typically requires ongoing medical management.
Gastroparesis and Slow Stomach Emptying
Gastroparesis is a condition where the stomach takes too long to empty its contents into the small intestine. Normally, the vagus nerve signals the stomach muscles to contract and push food forward. When that nerve is damaged, those signals weaken, and food sits in the stomach far longer than it should. This causes nausea, vomiting, bloating, and a feeling of fullness after eating only a small amount.
Diabetes is the most common cause. Prolonged periods of high blood sugar can damage the vagus nerve over time, and the resulting slow digestion makes blood sugar even harder to control. Surgery on the stomach or small intestine can also injure the nerve. In many cases, no clear cause is found.
Alcohol and Tobacco
Alcohol is a direct irritant to the stomach lining. Even moderate amounts increase acid production and can inflame the mucosal barrier that protects the stomach wall. Heavy or chronic drinking compounds this effect, raising the risk of gastritis and ulcers.
Nicotine from cigarettes or other tobacco products hits the stomach from multiple angles. It increases acid and digestive enzyme secretion, speeds up gut motility, promotes bile reflux from the small intestine back into the stomach, and raises the risk of H. pylori infection. At the same time, it reduces the stomach’s natural defenses: mucus production drops, blood flow to the stomach lining decreases, and prostaglandin levels fall. The combination of stronger aggressive factors and weaker protective ones makes smokers especially prone to ulcers and chronic stomach irritation.
Hormonal Changes During Pregnancy
Morning sickness is one of the earliest and most recognizable signs of pregnancy, typically starting between weeks 4 and 9. Rising hormone levels, particularly human chorionic gonadotropin (hCG) and progesterone, are thought to be the primary drivers. Progesterone relaxes smooth muscle throughout the body, including the muscles of the digestive tract, which slows digestion and can cause nausea and bloating. For most people, symptoms improve by the second trimester, though a small percentage experience nausea throughout the entire pregnancy.
Warning Signs That Need Urgent Attention
Most stomach upset resolves on its own or with simple changes. But certain patterns point to something more serious. Sudden, severe abdominal pain that doesn’t ease within 30 minutes warrants emergency care. So does abdominal pain accompanied by continuous vomiting, high fever, or blood in your stool or vomit.
Location matters too. Severe pain in the lower right abdomen, especially with nausea, vomiting, and fever, can signal appendicitis. Pain in the middle upper abdomen that worsens after eating and lasts for days may point to pancreatitis. In women of reproductive age, severe abdominal pain with vaginal bleeding could indicate an ectopic pregnancy. These conditions require prompt treatment and shouldn’t be waited out at home.

