If your ratio of potassium in the blood with calcium and sodium were off while taking epsom salt, it would be an individual basis for the circumstance you were in. Potassium and magnesium usually go together and if you have more of one over the other you can cause problems. Potassium is an intracellular electrolyte while sodium is extracellular (in fluids only). Your potassium was most likely not high enough in relevance to the amount of magnesium you had been consuming, thus causing your reaction.