As with any other food, it is best not to eat too close to the time you plan on going to bed. This helps enable your digestive system to rest while you sleep.