In a way, magnesium can reduce heartburn pain, but if you are pregnant, you have to be cautious about using it, so make sure that you are aware of all the factors.