Magnesium absolutely helps, and with our modern farmed diet, most people are deficient. It it part of over 300 chemical reactions in the body.
I've also been seeing a lot of comments about melatonin. For those taking it, as long as you aren't on an SSRI or other seratonin regulator, take 500mg (up to 2g) of L-Tryptophan. It's one of 9 essential amino acids (of like 22) that we only get from food, and is the basis of seratonin. The chemical process in the body is Tryptophan -> 5HTP -> Seratonin -> Melatonin. Again, because of our modern diet, we don't get enough of these essential amino acids. Many people with mild anxiety have gotten off anti-anxiety meds by switching to just taking tryptophan. Anyway, it's helped me, but it gets a bad rap because "tryptophan makes you sleepy after Thanksgiving". Actually, no it doesn't, it's the amount of food you eat, honestly.