Magnesium sulfate is used for short-term relief of constipation. It is also used as a soaking solution to relieve minor sprains, bruises, muscle aches or discomfort, joint stiffness or soreness, and tired feet. This medicine is a laxative and soaking solution.Magnesium sulfate (study drug) is a medication containing magnesium that is commonly used to improve low blood levels of magnesium. Magnesium sulfate has also proven to be successful in managing pain before and after surgery. However, this drug has primarily been used for pain control in patients undergoing surgery.