This is a randomized trial with hundreds of subjects. The two groups should be statistically similar to each other in their magnesium levels (and other attributes). That's the purpose of randomization: so you don't have to find and control for confounders afterwards like you do in a non-randomized trial. It's easy to obscure or reverse a result by controlling for the wrong variables, for some examples see https://slatestarcodex.com/2019/06/24/you-need-more-confound...