Too much oral magnesium can cause diarrhea. The chance of a diarrhea problem can be minimized by taking smaller amounts of magnesium spaced throughout the day and by drinking plenty of water. Severe magnesium deficiency may require magnesium to be given by injection. Many physicians who specialize in preventive or alternative medicine have had great success with giving their patients magnesium intravenously or by injection. Moderate amounts of oral magnesium usually do not cause problems.
Magnesium citrate is also an easily absorbed form of magnesium.
American Journal of Medicine.