Almonds are rich in magnesium, which helps you to stay asleep for longer. Research from the Journal of Orthomolecular Medicine linked low levels of magnesium to waking up in the night. Almonds also help with muscle relaxation and keeping blood sugar levels stable during sleep.