Why You Get Diarrhea When Sick: Causes and Recovery

Diarrhea during illness is your body’s way of flushing out the infection. Whether you’re dealing with a stomach virus, food poisoning, or a bacterial infection, your intestines actively push water into the gut to wash pathogens out. It’s unpleasant, but it’s a defense mechanism, not just a side effect.

Your Immune System Triggers a Flush

When a pathogen enters your gut, your immune system doesn’t just fight it with antibodies. It also changes the physical environment of your intestines to make them less hospitable. One key response involves a protein called claudin-2, which your body produces more of during infection. Claudin-2 loosens the connections between the cells lining your intestines, allowing water and sodium to flow into the gut lumen. This creates the watery stool you experience as diarrhea.

Research from Brigham and Women’s Hospital demonstrated just how important this flushing action is. In mice that couldn’t produce claudin-2, infections became significantly worse: the pathogens colonized more of the gut lining, the immune response became exaggerated, and tissue damage was more severe. Mice that overproduced claudin-2 had the opposite outcome, with milder disease. In other words, diarrhea isn’t collateral damage. It’s your body deliberately washing out the invaders.

How Viruses Damage Your Gut Lining

Stomach viruses like norovirus and rotavirus are the most common causes of infectious diarrhea, and they each do slightly different things to your intestines. Rotavirus targets mature cells at the tips of the tiny finger-like projections (villi) that line your small intestine. It flattens these villi, a process called villus blunting, which reduces the surface area available to absorb nutrients and water. Rotavirus also disables key transport proteins that your intestinal cells use to move sodium, glucose, and chloride. With those transporters knocked out, your gut simply can’t reabsorb the fluid it normally would.

Norovirus causes similar structural changes, including broadened and blunted villi and swollen cells, but with surprisingly little visible inflammation. It also dilates the small lymphatic vessels in the gut wall, which impairs fat absorption. Both viruses trigger the release of serotonin in the gut, a chemical signal that speeds up intestinal contractions and increases fluid secretion, pushing everything through faster than normal.

Astrovirus, a less well-known culprit, takes a different approach. It infects the mucus-producing goblet cells in your intestines and ramps up mucus production. It also disrupts the structural proteins that hold intestinal cells tightly together, making the gut lining leakier.

How Bacterial Toxins Force Water Into Your Gut

Bacterial infections cause diarrhea through a more direct chemical hijacking. Many disease-causing bacteria produce toxins that target the chloride channels in your intestinal cells. Normally, these channels help regulate how much salt and water moves in and out of the gut. Bacterial toxins override that regulation.

The classic example is cholera toxin, which locks a specific chloride channel (called CFTR) in the “open” position by flooding the cell with a signaling molecule called cAMP. With chloride pouring into the gut lumen, sodium follows to balance the electrical charge, and water follows the sodium by osmosis. The result is the profuse, watery diarrhea characteristic of cholera. The toxin produced by traveler’s diarrhea bacteria works through a parallel pathway, using a different signaling molecule (cGMP) to open the same chloride channel.

Some bacteria, like C. difficile, take a more destructive approach. Rather than manipulating ion channels, C. difficile toxins attack the internal scaffolding of intestinal cells, breaking down the barrier itself. Fluid leaks through the damaged lining in what’s called a “leak-flux” mechanism, often accompanied by significant inflammation and tissue injury.

Why Your Gut Speeds Up During Illness

Diarrhea isn’t just about extra water in the gut. Your intestines also move their contents through faster than usual. Inflammatory signals play a major role here. When your immune system detects an infection, it releases cytokines, proteins like TNF-alpha and IL-6, that alter how intestinal muscles contract. These cytokines suppress the normal rhythmic contractions that slowly move food along and can shift the gut into a faster, less coordinated pattern.

Serotonin amplifies this effect. About 90% of the serotonin in your body is made in the gut, and infections trigger a surge of it. Serotonin acts on receptors throughout the gastrointestinal tract, increasing both the speed of intestinal movement and the amount of fluid secreted into the gut. The combination of faster transit and more fluid means less time for your intestines to absorb water, which is why stools become loose and frequent.

Why Dehydration Is the Real Danger

The diarrhea itself is protective, but the fluid loss it causes can become dangerous. In mild dehydration (roughly 3% to 5% of body weight lost as fluid), you might only notice that you’re urinating less often. At moderate dehydration (6% to 10%), your mouth feels dry, your skin loses its normal bounce-back when pinched, your heart rate increases, and you may feel irritable or lightheaded. Severe dehydration, over 10%, is a medical emergency with symptoms like confusion, lethargy, rapid breathing, and low blood pressure.

Children and older adults are most vulnerable because they have less fluid reserve and may not recognize or communicate thirst effectively. The key to managing diarrhea at home is replacing both the water and the electrolytes you’re losing. The WHO’s oral rehydration solution uses a specific balance of glucose and sodium (75 milliequivalents per liter of each) because glucose and sodium are absorbed together in the intestine, pulling water along with them. You don’t need to buy medical-grade rehydration packets for a typical stomach bug, but drinks that contain both some sugar and some salt work better than plain water alone.

What to Eat During and After

The old advice to stick strictly to bananas, rice, applesauce, and toast (the BRAT diet) is outdated. While those foods are gentle on the stomach, there’s no clinical evidence that restricting yourself to just those four items helps recovery. Harvard Health notes that eating only BRAT foods for more than a day or two can actually slow healing because they lack the protein and nutrients your body needs to repair intestinal damage.

During the worst of it, eat whatever bland foods appeal to you: brothy soups, oatmeal, boiled potatoes, crackers, or plain cereal. Once the nausea subsides, start adding more nutritious options like cooked carrots, sweet potatoes, avocado, skinless chicken, fish, and eggs. These are still easy to digest but provide the building blocks your gut needs to recover.

How Long Your Gut Takes to Recover

Even after the diarrhea stops, your gut isn’t back to normal. The infection disrupts your intestinal microbiome, the community of bacteria that helps with digestion, immune function, and nutrient absorption. Research tracking patients after acute gut infections found that while overall bacterial diversity and evenness returned to levels similar to healthy household members, the total richness of bacterial species remained significantly lower even at an average of 108 days after infection. Some patients were tracked for over 200 days before their follow-up samples were collected.

This is one reason some people experience lingering digestive symptoms like bloating, gas, or irregular stools for weeks or even months after a stomach bug. Eating a varied diet with fiber-rich foods helps support microbiome recovery, though the timeline varies from person to person.

Signs That Diarrhea Needs Medical Attention

Most bouts of infectious diarrhea resolve on their own within a few days. But certain features signal something more serious. Blood in your stool, a high fever, or signs of significant dehydration (dizziness when standing, no urine output for several hours, or confusion) all warrant prompt evaluation. Large-volume watery diarrhea that persists beyond three days without improvement, or small-volume bloody diarrhea with abdominal pain and fever, can indicate infections that need targeted treatment rather than just supportive care.