I had similar problems towards the end of my pregnancy. The advice from my doctor (I refuse to take medication) is to eat often, small meals and avoid food that causes gas such as beans to avoid heart burn. I eat throughout the day and snack often. Usually every two hours with cheese, fruits and small portions of spaghetti.