It's not something we've ever seen before with the Plan. It could relate to detoxification with the Plan. Magnesium plays a vital role in detoxification of many compounds. Candida increases levels of oxalates and other acids in the tissues, which magnesium would bind with to eliminate.
The sweating on the Plan will release magnesium and depending on how well your body is able to replenish magnesium can be a factor.
Long-term gut imbalances decrease magnesium absorption.
Magnesium is used in over 300 reactions, so depending on what is happening with your body, those can be additional factors.
It may have been a combination of any of the above or all of them.
Glad to hear that you're feeling better and that the Plan was successful for you.