It depends on what you are eating before bed. A cup of hot cocoa is not bad. A plate of spaghetti is not optimal. Nutritionists (and I am one) agree that something small before bed helps regulate your glucose levels through the night and places less stress on your liver.
Again, this isn't a "eat whatever whenever" post. But eating something small will not hurt you.