Ask the experts
Prilosec Prevacid, Aciphex are proton pump inhibitors (PPIs), drugs that are very effective in shutting down acid production by the stomach. Prilosec and other PPI drugs are most effective during the day, especially after meals. That is why they are taken just prior to meals. However, PPIs don't work as well at night.
Ranitidine (Zantac) is a H2-receptor-blocker. Generally H2-receptor-blockers are not as effective as the PPI drugs in suppressing stomach acid production. However, Zantac and other H2-receptor blockers work particularly well at night. Therefore maximal round the clock acid suppression is achieved by using a PPI such as Prilosec two or three times a day before meals and a H2-receptor-blocker such as Zantac at bedtime.
FDA Prescribing Information