I have seemed to do a much better job managing my heartburn this pregnancy than during the last one. I got to the point last time where I couldn't even sleep and had to go on medication.
This time, I've made a few changes and I really believe they are helping. For one, I just avoid spicy food. Even a bowl of mild chili will get my heartburn going. And then I also make sure to eat smaller meals. I end up eating more frequently. I have a small breakfast, snack on something like an apple about 2-3 hours later, eat a small lunch, have another snack, eat a small dinner, and then have another snack before bed. So, I'm eating about every 2-3 hours. But because I'm eating small amounts at a time, it doesn't get backed up in my stomach and create heartburn. I also find, ironically, that milk makes it worse. Water doesn't really affect me. I drink a lot of water.