Melatonin vs Magnesium

for sleep

Stronger evidence: tie

Stronger effect: tie

Safety: Melatonin has the more serious interaction profile (uncertain vs minor).

For sleep, the two are evidence-matched; the difference is in effect and safety.

Melatonin

grade B moderate certainty

reduces time to fall asleep; best for circadian timing

0.5–3 mg

Magnesium

grade B moderate certainty

modest improvement in sleep

200–400 mg, glycinate, adults
sources: PMID:00000006 · PMID:00000001