Magnesium draws water into the intestines, which can act as a laxative. This increase in water can soften stool and help pass waste through your system.