It would not be a good idea to eat a large amount of carbohydrate containing foods, especially those containing sugars, right before bed. This would provide your body with all sorts of energy it does not need to sleep. As a result, it would be stored to fat more easily than if you were awake being at least semi active.