Sodium, magnesium, and potassium have a big impact on each other. After a liver flush, the extra magnesium could affect the levels of both the sodium and the potassium. The sodium may be helping because it has a reducing effect on the magnesium levels, but may not give lasting relief because it doesn't replace what may be most depleted, which could be potassium. I would suggest either using a supplement of potassium gluconate, or getting Salt Substitute by Morton's. Use between 1/8 and 1/4 tsp of the Salt Substitute or between 2-6 tablets/caps of the supplement.
And of course, rehydration is vital, but I know you are already aware of that.