Heartburn can be exacerbated by bad dietary choices, stimulants like coffee (which you want to be careful with in pregnancy for other reasons too. See drinking coffee while you are pregnant is it OK?), tight-fitting clothes and a sedentary lifestyle. Being active and eating healthily has many benefits, and can help prevent heartburn too but when you are pregnant, it is pretty hard to avoid heartburn altogether. Frequent episodes of heartburn are more likely to become a problem once your baby is relatively big and puts pressure on your stomach sometimes in the second trimester.
Over the counter medications are available for heartburn, but there is some evidence that antacids can have a negative effect on your fetus if taken in large quantities. For that reason, I prefer natural remedies for acid reflux. Fortunately, there are many of these around. Besides following acid reflux diet, my absolute favorite is baking soda. All you have to do is dissolve a teaspoon or so into a glass of water, and drink the mixture. For me, it cures heartburn every time. Some other natural remedies for heartburn include papaya or pineapple enzymes, large quantities of almonds, and straight apple cider vinegar. Another remedy that I have really found effective is... Coca cola! Indeed, this should not be listed under "natural cures", as it is far from natural. But it tastes great and give you heartburn relief, too!