This effect is more pronounced with lower-quality magnesium supplements, such as magnesium oxide, magnesium sulfate, and magnesium chloride. These compounds are insoluble in water (magnesium oxide), or their counter-ions are not absorbed (magnesium sulfate). Magnesium + glycine (specifically bisglycinate which is the magnesium salt with two glycine molecules) is more bioavailable and does not have a laxative effect since glycine is easily absorbed by cell walls. Magnesium citrate also does not have a marked laxative effect and is more bioavailable than magnesium oxide, but less bioavailable than magnesium bisglycinate.
Thank you for the info, I'll check those out, my medication is thought to affect nutrient levels so I take supplements (I found out about the laxative effects myself..)