regardless, if you struggle with sleep, eating some walnuts before bed may help. about a handful of walnuts is an adequate portion. walnuts have a few properties that may promote better sleep. for instance, they're a great source of melatonin and healthy fats.