it may be the other way around the deficiency causes the adrenal fatigue, the links to candida would be case dependent. Thyroid function can also cause malabsorption of nutrients like magnesium but again would be case dependent. of course finding someone who can do the proper testing for you is necessary for you to find which thing is affecting you.
The best thing I have found to help me food wise has been Maca extract! It's a natural food so easily absorbable by the body and has helped my magnesium deficiency symptoms.