"Supplementation of 500 mg of Mg has been associated with significant improvement in the insomnia severity index, sleep time, sleep efficiency, sleep onset latency, serum cortisol concentration, serum renin, and melatonin." https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5637834/
"As compared to the placebo group, in the experimental group, dietary magnesium supplementation brought about statistically significant increases in sleep time..." https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3703169/
"When Mg2+ was reintroduced in food and water, sleep organization and ECoG recordings were restored to their original patterns." https://www.ncbi.nlm.nih.gov/pubmed/8232845