For immediate gastritis pain, over-the-counter antacids provide the fastest relief by neutralizing stomach acid on contact. If your pain keeps returning, stronger options like acid-reducing tablets or proton pump inhibitors can suppress acid production for hours at a time. The right choice depends on how often your pain flares and what’s causing it.
Antacids for Quick Relief
Antacids (brands like Tums, Maalox, and Mylanta) work by directly neutralizing the acid already sitting in your stomach. They don’t stop your body from making more acid, so the relief is real but temporary, usually lasting 30 minutes to two hours. They’re best for occasional flare-ups or as a bridge while you wait for a longer-acting medication to kick in.
Liquid antacids tend to coat the stomach lining more evenly than chewable tablets, which can make them slightly more effective during an active flare. If you find yourself reaching for antacids more than a couple of times a week, that’s a signal to step up to something stronger.
H2 Blockers for Longer-Lasting Control
H2 blockers, like famotidine (Pepcid), reduce the amount of acid your stomach produces by blocking the chemical signal that tells your stomach cells to secrete it. They take about 30 to 60 minutes to start working but provide relief that lasts significantly longer than antacids. Famotidine is the most widely available H2 blocker and comes in 20 mg tablets. For active stomach problems, the typical approach is 20 mg twice a day, morning and bedtime, for up to six to eight weeks.
H2 blockers are a good middle ground: stronger than antacids, gentler than proton pump inhibitors, and available without a prescription. They work well for mild to moderate gastritis pain that shows up predictably, like after meals or at night.
Proton Pump Inhibitors for Persistent Pain
Proton pump inhibitors (PPIs) like omeprazole (Prilosec) and lansoprazole (Prevacid) are the most powerful acid suppressors you can get over the counter. They shut down the acid-producing pumps in your stomach lining rather than just blocking one chemical signal, which makes them substantially more effective than H2 blockers.
The tradeoff is that PPIs don’t provide instant relief. They need one to three days of daily use to reach full effect, so they’re not what you want for a pain flare happening right now. They’re designed for gastritis that’s been going on for days or weeks and isn’t responding to milder treatments. Over-the-counter PPIs are generally intended for 14-day courses, and you shouldn’t use them longer without medical guidance because prolonged acid suppression can affect nutrient absorption and other body systems.
Painkillers That Make Gastritis Worse
This is the most important thing to know if you’re in pain: do not take ibuprofen (Advil, Motrin), aspirin, or naproxen (Aleve) for gastritis. These are all NSAIDs, and they work by blocking enzymes that produce inflammation-related chemicals called prostaglandins. The problem is that those same prostaglandins also maintain the protective mucus layer inside your stomach. Blocking them strips away that defense, allowing acid to directly irritate and damage the stomach lining. Even short-term NSAID use can cause stomach pain, heartburn, nausea, and vomiting.
If you need pain relief for something unrelated to your stomach, like a headache or muscle ache, acetaminophen (Tylenol) is a safer alternative. It works through a different mechanism and causes significantly fewer stomach problems than NSAIDs. If you’ve been taking NSAIDs regularly and now have gastritis symptoms, stopping them is often the single most effective step you can take.
When the Cause Is a Bacterial Infection
A common cause of chronic gastritis is infection with H. pylori, a bacterium that burrows into the stomach lining and triggers ongoing inflammation. No amount of antacids or dietary changes will resolve gastritis caused by H. pylori because the infection keeps fueling the problem. You’ll need a combination of antibiotics and an acid-suppressing medication, prescribed by a doctor, taken for 14 days.
These regimens typically pair two antibiotics with a strong acid reducer to create an environment where the antibiotics can work effectively. Eradication rates are high when the full course is completed. If your gastritis pain has lasted more than two or three weeks despite OTC treatment, H. pylori testing (usually a breath test or stool test) is a reasonable next step.
Foods and Drinks to Avoid
What you eat won’t cure gastritis, but it can make the difference between manageable discomfort and a miserable day. The main categories to limit or avoid during a flare:
- Acidic foods: citrus fruits, tomato sauce, tomato juice, orange and grapefruit juice
- Spicy seasonings: chili powder, black and red pepper, curry powder, hot peppers
- High-fat foods: fried foods, fast food, full-fat dairy, processed meats like sausage, bacon, and salami
- Caffeine and alcohol: coffee (regular and decaf), cola, green and black tea, alcoholic drinks
- Chocolate: contains both caffeine and compounds that relax the valve between your stomach and esophagus
You don’t need to eliminate all of these permanently. During an active flare, pulling back on the worst offenders gives your stomach lining time to heal. Bland, low-acid, moderate-portion meals are the general goal. Once the inflammation settles, you can reintroduce foods one at a time to identify your personal triggers.
Soothing the Stomach Lining Naturally
Slippery elm is one of the better-studied herbal options for stomach irritation. It contains a substance called mucilage that forms a gel when mixed with water. This gel coats inflamed tissue in the digestive tract, creating a physical barrier between your stomach lining and acid. It can also stimulate your intestines to produce more of their own protective mucus. You’ll find it as lozenges, powders, and capsules in most health food stores.
These remedies are best used alongside conventional treatment rather than as replacements. They can take the edge off discomfort, but they won’t address the underlying cause if your gastritis is driven by an infection, NSAID use, or heavy alcohol consumption.
Nighttime Pain Relief
Gastritis pain often worsens at night because lying flat allows stomach acid to pool against inflamed tissue. A few adjustments can make a real difference. Elevate the head of your bed six to eight inches using blocks or a wedge placed under the mattress. Simply stacking pillows doesn’t work as well because it bends your body at the waist, which actually increases pressure on your stomach.
Sleep on your left side. This position reduces the amount of acid that reaches the upper stomach and esophagus. Sleeping on your right side has the opposite effect and is associated with more reflux episodes. Stop eating at least three hours before bed, and avoid drinking large volumes of fluid in the evening. Loose-fitting pajamas help too, since tight clothing around your waist increases abdominal pressure and pushes acid upward.
Signs You Need Immediate Care
Most gastritis responds well to the strategies above, but certain symptoms mean something more serious is happening. Vomiting blood, finding blood in your stool, or noticing stools that look black and tarry all suggest bleeding in the stomach lining. Severe pain that doesn’t respond to any treatment, inability to keep food or water down, and feeling lightheaded or dizzy are also signals to get medical attention right away rather than continuing to self-treat.

