When you eat, it gives the excess acid something to work on and this is why you
feel better. It also sounds like you
have some GERD (acid reflux) the the bile coming up. Stop the Pepcid and try chewing Tums, if this helps then we know it's too much acid. Tums, and other antacids gets rid of the acid. But you need to see a doctor about the GERD, the bile coming up can erode your esophagus. When sleeping, keep your held slightly elevated. Your stress is adding to your problems.