Famotidine is taken at night because your stomach produces the most acid during nighttime hours, and the drug’s 10-to-12-hour duration of action lines up almost perfectly with a full night of sleep. By blocking acid production right when it peaks, a bedtime dose prevents the heartburn, reflux, and ulcer pain that would otherwise wake you up or cause damage while you’re lying flat.
Your Stomach Makes the Most Acid at Night
Gastric acid secretion follows a circadian rhythm, rising sharply in the late evening and peaking between 10 p.m. and 2 a.m. This surge is driven by the vagus nerve, the main parasympathetic nerve connecting your brain to your gut. During the day, food in your stomach triggers acid production on demand. At night, acid production ramps up on a biological clock, independent of eating.
This matters because you’re lying down during those peak hours. When you’re upright, gravity helps keep stomach acid where it belongs. In a horizontal position, acid can easily wash up into your esophagus. The combination of maximum acid output and a flat sleeping position is why nighttime reflux tends to be more damaging and more disruptive to sleep than daytime episodes.
How Famotidine Targets Nighttime Acid
Famotidine belongs to a class of drugs called H2 blockers. Your stomach’s acid-producing cells have receptors for histamine (a different role from the histamine involved in allergies). When histamine binds to these receptors, the cells pump out acid. Famotidine sits on those receptors and blocks the signal, so less acid gets made.
What makes H2 blockers especially well-suited for nighttime use is that they’re most effective against basal and nocturnal acid secretion, the steady background acid your body produces without any food stimulus. This is the type of acid that dominates overnight. Proton pump inhibitors (PPIs) like omeprazole work differently and are generally taken before meals, when food-stimulated acid is the target. Famotidine fills a distinct role by covering the hours when you’re not eating.
The Timing Window
Famotidine starts working within about one hour of swallowing it, with peak effects at one to three hours. Its acid-suppressing action lasts roughly 10 to 12 hours. So if you take it at 10 p.m., you get strong coverage from about 11 p.m. through 8 or 9 a.m., which neatly spans the overnight acid peak and your entire sleep period.
The NIH recommends taking prescription famotidine once daily at bedtime. If you’re using it specifically to prevent heartburn from a late dinner, one study found that taking a low dose about an hour before the evening meal successfully prevented post-meal heartburn and the sleep disruption that comes with it. In general, taking it 30 to 60 minutes before you plan to lie down gives the drug enough time to reach effective levels.
Why Some People Add It to a PPI
Even people already taking a PPI sometimes experience what’s called nocturnal acid breakthrough: one or more continuous hours overnight where stomach acid levels spike despite the PPI. This is surprisingly common, and it happens because PPIs wear off or don’t fully suppress the nighttime acid surge.
Adding a bedtime dose of famotidine on top of a PPI can help. A Cochrane meta-analysis of eight clinical trials found that bedtime H2 blockers cut the rate of nocturnal acid breakthrough by roughly half compared to a PPI alone. People in these trials also spent significantly less time with high stomach acidity overnight, and their average stomach pH rose meaningfully. The studies tested famotidine at doses of 20 mg and 40 mg at bedtime alongside twice-daily PPI regimens.
There’s a caveat: some evidence suggests the benefit may diminish after a few weeks of nightly use, as the body partially adapts. This is why some doctors recommend using bedtime famotidine on an as-needed basis rather than indefinitely when pairing it with a PPI.
The Sleep Connection
Nighttime reflux doesn’t just cause discomfort. It fragments sleep in ways you might not fully recognize. Acid washing into the esophagus can trigger brief arousals, pulling you out of deeper sleep stages even if you don’t fully wake up. Over time, this leads to poor sleep quality, daytime fatigue, and morning throat irritation.
By suppressing acid during the hours you’re most vulnerable, a bedtime dose of famotidine can break this cycle. Research on low-dose famotidine taken before evening meals found it effectively prevented the heartburn that interfered with falling and staying asleep. For many people, the sleep benefit is the most immediately noticeable improvement.
Practical Tips for Bedtime Dosing
Famotidine can be taken with or without food, which makes bedtime dosing straightforward. If you’ve eaten a late meal, the drug still works, though taking it on a relatively empty stomach may allow slightly faster absorption. A glass of water is all you need.
Avoid lying down immediately after taking it if you’re already experiencing active reflux symptoms. Give it at least 30 minutes to start working. If your main problem is reflux from dinner, taking the dose an hour before your evening meal and then again at bedtime (if your prescribed regimen allows twice-daily dosing) covers both the post-meal window and the overnight peak.
Over-the-counter famotidine is available at 10 mg and 20 mg. Prescription doses go up to 40 mg. The standard bedtime dose for ulcer healing and GERD maintenance is typically 20 mg, though your dose depends on what you’re treating and whether you’re combining it with other medications.

