Magnesium status is strongly related to the function of ATP. ATP and magnesium form a complex (Mg-ATP), which enables ATP to be active in reactions.
A study has found magnesium to be low in ME/CFS patients (1) and this low magnesium can impact ATP functioning.
Magnesium interacts with glutathione. Some steps in the synthesis are ATP and magnesium dependent and magnesium deficiency reduces glutathione (2). On the other hand, glutathione and vitamin E have in turn been shown to raise intracellular magnesium status (3,4). So having enough of these levels might be important to sustainably raise magnesium levels.
Magnesium is also relevant in other processes, like activating vitamin B1 and being a cofactor in the glycolysis and the pyruvate dehydrogenase phosphatase (5), the activating enzyme of the pyruvate dehydrogenase complex. Also, it acts as a calcium antagonist in muscle contractions.