Almonds, walnuts, and pistachio nuts can help promote sleep. Almonds contain magnesium. When your body is low on magnesium, it is harder for your body to stay asleep. This mineral promotes sleep and muscle relaxation. Walnuts contain melatonin, and offer a good supply of L-tryptophan. This is an amino acid that helps the body produce serotonin – a chemical necessary to maintain a proper sleep cycle.