Heartburn usually occurs after mealtimes. You are more likely to get heartburn by eating too much, too fast, or too close to bedtime. Eating certain types of foods and drinks can also increase your risk of getting heartburn.