Anything you put on your skin is the same thing as eating it.
It may be, as Luc said, that you can't tolerate magnesium at all. But another possibility is that you simply can't tolerate this much of it without building up to it.
We don't know exactly how much mag you took in via your feet, but, let's just say you took in 200 mg. That means you were not taking mag regularly, and you suddenly took 200 mg. I had problems when I did that orally in early w/d. First, it relaxed me, and then I had a rebound of speedy heart beat so bad that I nearly called 911.
So, then, I waited awhile, and then I slowly built up eating mag, increasing by 50 mg at a time. That worked well.
So, I think you have to forgo epsom salt footbath for the time being, because we can't control how much mag you take in from it. You could use lavender in a footbath, and maybe try eating 50 mg mag.