Look for " Epsom Salts , Magnesium Sulfate U.S.P." which means it is pure. Don't take the bath salts as it contains impurities which may harm you. The MgSo4 USP says on the label it can be used as a saline laxative.
I have read that Magnesium can build up to toxic levels in the body but it seems to be very rare. Several people have asked this question in older posts - you can read some expert answers there.