All great suggestions.
The lifestyle changes will have much higher impact than supplements and may prevent the need for supplementation.
One note on testing for deficiency: many people are deficient in magnesium, as levels in food have dropped and most people drink filtered, treated water. Magnesium is a cofactor in more than 300 enzyme systems throughout the body so it’s very important to have enough.
The most common way mg levels are tested for is the RBC test which tests the levels in your red blood cells. However, that test can be misleading. When the levels in your blood get low, cells dump mg into the blood stream so it’s hard to tell whether you’re deficient or not from that teat alone. Getting an EXA test will measure the mg levels in your cells.