Magnesium helps regulate neurotransmitters and reduces the stress hormone cortisol, aiding in anxiety relief.