In most cases, Mylanta should be safe to use to treat heartburn during pregnancy. However, it is still a good idea to speak with your healthcare provider about it beforehand.