irritating magnesium forms include epsom salt, citrate, malate, oxide. glycinate and orotate are the best tolerated aside from possibly some ionic forms.
too much magnesium can speed up the metabolism and stress out your adrenal response.
you could also be low on calcium, as magnesium and calcium antagonize eachother.
if you're serious about minerals then get a hair mineral test.
symptoms of magnesium deficiency can also match about 1000 other things.