See a gastroenterologist, he specializes in your type of problem. It sounds like you have a hiatal hernia where the stomach contents backs up in your throat when you lie down. This can erode your esophagus over time.. It could be that you just need to change to a better drug or you may need surgery depending on how bad the hernia is. The hernia repairs can be done laproscopically now with very minimal discomfort (only 4-5 punctures) no big incisions. A hiatal hernia is where the diaphragm (the tissue that holds your stomach down) becomes riipped and the stomach then goes through it up next to your esophagus. Since your esophagus is not lined with the same sort of tissue as your stomach,it can not handle all the acid and becomes ulcerated. The test the doctor will do is an endoscopy. You will be sedated and they will place a tube down your throat into your stomach. It's really not bad at all. That's the only way they can tell exactly how bad it is and the proper treatment for you. If it is not taken care of ,it can cause you to choke while eating and possibly black out.This is rare but it happened twice to my friend.and he had many episodes of near strangulation. Don't suffer when something can be done. My friend said if it knew it was that easy he would have had it done years ago. PS: don't eat for at least 3 hours before bed,no chocolate,caffiene ,alcohol or spicy foods late at night . Good luck and see a doctor.
Retired surg. nurse