You are more likely to get heartburn on an empty stomach than if you have a small meal. This is also a sign of stomach ulcers if it happens when you are not pregnant.