Magnesium compounds are used medicinally as common laxatives, antacids (i.e., milk of magnesia), and in a number of situations where stabilization of abnormal nerve excitation and blood vessel spasm is required (that is, to treat eclampsia).