Take this medicine at least one hour before you go to bed. Taking medication immediately before going to bed can have side effects. For example, lying down after taking the pill can back up into the esophagus, irritate and sometimes ulcerate the esophagus lining.