Your Health Is Milk of Magnesia Safe During Pregnancy? What Is Milk of Magnesia and How It Works? Milk of magnesia, also known as magnesium hydroxide, is a type of saline laxative that is often used to treat constipation.