Medically reviewed by Lindsay Cook, PharmD

Credit: Viktoriya Skorikova / Getty Images
Some supplements, such as melatonin, L-theanine, and tryptophan, may have an additive or synergistic effect on sleep when taken with magnesium.
The combined relaxing effect of L-theanine and magnesium may help you sleep better by calming your brain.
Magnesium and melatonin may work together in different ways to help you sleep better.
Magnesium can help you sleep better by calming your nervous system and increasing the production of sleep hormones. Some supplements, such as melatonin, L-theanine, and tryptophan, may have an additive or synergistic effect on sleep with magnesium, meaning taking them together can improve your sleep quality.
1. Melatonin
Magnesium and melatonin may work together in different ways to help you sleep better. Melatonin is a hormone that regulates your sleep-wake cycle.
Melatonin prepares your body for sleep and shortens the time it takes you to fall asleep. It can also prolong overall sleep time.
Magnesium, on the other hand, helps the body feel more relaxed, easing into sleep and potentially increasing sleep time.
Moreover, magnesium supports the production of melatonin, which can further improve sleep.
Therefore, taking both magnesium and melatonin supplements together can improve sleep quality. In one study, researchers observed that three months of supplementation with magnesium, melatonin, and vitamin B complex, taken about one hour before bed, may help treat insomnia.
2. L-Theanine
L-theanine is an amino acid found in tea, especially green tea. Some studies suggest that L-theanine may increase alpha waves in the brain, which have a calming, relaxing effect and can improve sleep quality.
Magnesium also relaxes the muscles to help you sleep better. Hence, their combined relaxing effect may help you sleep better by calming your brain.
In addition, both magnesium and L-theanine do not cause daytime drowsiness, so they can be taken at any time.
That said, most studies on L-theanine and magnesium are individual studies rather than co-supplementation studies. More human studies are needed to demonstrate the clear benefits of taking L-theanine and magnesium together. However, animal studies show that taking both supplements improves sleep by boosting slow brain waves to help you relax and increasing hormones such as GABA that support relaxation.
3. Tryptophan
Tryptophan is an amino acid that your body uses to make melatonin and serotonin. Tryptophan supplementation can help prolong sleep time, reduce sleep fragmentation, and improve sleep quality.
Studies suggest that taking more than 1000 milligrams (mg) of tryptophan can help increase melatonin levels, which can enhance sleep. Magnesium also helps increase melatonin production, and its combined effect on melatonin might help improve sleep quality.
However, there are not enough studies that have looked at the benefits of taking both tryptophan and magnesium together.
In one study, researchers found that patients taking sleep aids containing magnesium and tryptophan had better sleep quality.
According to the study, co-supplementation with tryptophan and magnesium can help reduce night awakenings and increase deep sleep.
Read the original article on Health