Yes. It is safe and possibly even beneficial.
Epsom Salt. (magnesium sulfate) is the major ingredient in bath salts, and is also safe when properly taken by mouth as a laxative, or even as injection in some cases such as eclampsia.
I don't see a problm. I can't see any evidence that this material would leach into your body & bother baby. I wouldn't drink any unless you want to get the runs.