The fastest relief for gastritis pain comes from antacids, which neutralize stomach acid within minutes. For longer-lasting control, H2 blockers and proton pump inhibitors (PPIs) reduce acid production over hours or days. But the best approach depends on whether your pain is occasional or chronic, and what’s causing the inflammation in the first place.
Antacids for Quick Relief
Antacids are the go-to option when gastritis pain hits and you need it to stop now. They work by directly neutralizing the acid already in your stomach, which is why they act faster than any other option. The trade-off is that the relief doesn’t last long, typically a few hours at most. Common antacids contain calcium carbonate, magnesium hydroxide, or aluminum hydroxide, and they’re available without a prescription at any pharmacy.
Antacids work best as a short-term rescue tool. If you’re reaching for them multiple times a day or relying on them for more than a couple of weeks, that’s a sign your gastritis needs a stronger approach.
H2 Blockers for Moderate, Longer Relief
H2 blockers take about an hour to kick in, but their effects last four to ten hours. Instead of neutralizing acid that’s already there, they reduce how much acid your stomach produces in the first place. Famotidine (Pepcid) is the most widely available H2 blocker over the counter.
These are a solid middle ground: slower than antacids but with a much longer window of relief. If your gastritis pain tends to flare at predictable times, like after meals or at night, taking an H2 blocker beforehand can prevent the pain rather than chase it.
PPIs for Persistent Gastritis Pain
Proton pump inhibitors are the strongest acid-suppressing option and the most effective for ongoing gastritis. They shut down acid production more completely than H2 blockers, but they take longer to work. You may not feel the full benefit for one to four days, so PPIs aren’t the right choice if you need relief in the next hour.
Timing matters with PPIs. Research shows that taking a PPI 20 to 30 minutes before breakfast produces better acid suppression than taking it at other times of day. Morning dosing outperforms evening dosing for once-a-day use. The reason: PPIs work best when they coincide with the activation of acid-producing cells, which peaks after you eat. Taking one on an empty stomach right before a meal puts peak drug levels in your blood at exactly the right moment.
Low-dose PPIs like omeprazole 20 mg are available over the counter for short-term use (usually up to 14 days). If you need them longer, a doctor can prescribe a course tailored to your situation.
Avoid NSAIDs While Your Stomach Heals
If you’re dealing with gastritis pain and also taking ibuprofen, aspirin, or naproxen for other aches, those painkillers may be making things significantly worse. NSAIDs are one of the most common causes of gastritis because they strip away the protective mucus lining of the stomach. In many cases, simply stopping the NSAID is enough to let the stomach heal.
Acetaminophen (Tylenol) is a safer alternative for general pain relief during a gastritis flare. It works through a different mechanism and is far less likely to irritate the stomach lining. If you’ve been taking NSAIDs regularly and suspect they’re behind your symptoms, switching to acetaminophen while addressing the gastritis can make a noticeable difference within days.
Prescription Options for Severe Cases
When over-the-counter options aren’t enough, doctors have a few additional tools. One is sucralfate, a prescription medication that forms a thick, paste-like barrier over damaged areas of the stomach lining. It physically shields the inflamed tissue from acid, bile, and digestive enzymes while the mucosa heals underneath. It’s typically taken on an empty stomach four times a day.
If testing reveals an H. pylori bacterial infection, which is one of the leading causes of chronic gastritis, the standard treatment is a 14-day course of antibiotics combined with a PPI. The antibiotics eliminate the bacteria, while the PPI keeps acid levels low enough for the stomach lining to recover. Clearing the infection usually resolves the gastritis entirely, so it’s worth getting tested if your symptoms keep coming back despite taking acid-reducing medications.
Soothing Herbs and Natural Options
Slippery elm and marshmallow root are both high in mucilage, a gel-like substance that coats and soothes irritated tissue in the digestive tract. Slippery elm in particular has a long history of use for stomach complaints. The mucilage from its inner bark appears to act as a physical barrier against acid, similar in concept to what sucralfate does, though less potent. Both herbs are available as teas, lozenges, or capsules.
These aren’t replacements for acid-reducing medication in moderate or severe gastritis, but they can complement other treatments and provide some comfort, especially for people who prefer to minimize pharmaceutical use for mild symptoms.
Nighttime Pain and Sleep Position
Gastritis pain that worsens at night is common because lying flat allows stomach acid to pool against inflamed tissue. Two adjustments can help. First, elevate the head of your bed by about six inches using blocks or a wedge pillow. This uses gravity to keep acid lower in the stomach.
Second, sleep on your left side. A systematic review and meta-analysis found that left-side sleeping significantly reduces acid exposure compared to sleeping on your back or right side. The anatomy explains why: when you lie on your right side, your esophagus sits below the junction where it meets the stomach, making it easier for acid to flow upward. On your left side, gravity works in your favor. The American College of Gastroenterologists now includes left-side sleeping as a recommended lifestyle modification, and a randomized controlled trial confirmed it reduces nighttime symptoms and improves sleep quality.
Matching Your Treatment to the Cause
The best long-term strategy depends on what’s driving the inflammation. Gastritis from occasional overindulgence or stress responds well to a short course of antacids or H2 blockers alongside dietary adjustments like smaller meals and reduced alcohol. NSAID-related gastritis often improves dramatically just by switching pain relievers. H. pylori gastritis requires antibiotics to truly resolve. Autoimmune gastritis, where the immune system attacks the stomach lining, needs ongoing medical management.
If your pain is severe, if you’re vomiting blood, or if your stools look black or tarry, those are signs of possible bleeding in the stomach that requires immediate medical attention. The same applies if you feel dizzy or lightheaded alongside stomach pain, or if you can’t keep any food down.

