Neuroscientist Andrew Huberman recommends taking 145mg of magnesium threonate and 100-400mg of L-theanine before bed to help improve sleep quality. Magnesium helps relax muscles and activate the parasympathetic nervous system, while theanine increases calming alpha brain waves.