What Would You Suggest for Insomnia?

How close to bed to you eat? I started eating 60 grams of buckwheat before bed after this,

and now sleep soundly throughout the night