Because of restricted calories for weight-loss goals, hunger used to keep me awake in the middle of the night. Now I budget calories for a nutrition bar during a middle of the night wake-up. I fall right back to sleep afterwards.
In case you haven't heard, the whole "can't eat before sleeping" myth has been disproved by research. Calories eaten before sleep are metabolized exactly the same as calories taken any other time of the day.