Usually, changes in diet, increased sodium intake and stress (+others) cause the problem.
I found the combination of Ginger, celery and fennel to be very effective for heartburn relief.
You can buy a bottle for $15 here
http://www.naturallydirect.net/heart-burn-remedy.htm
or just eat the natural products with your diet.