Midnight snacks are good for you, but only if you are willing to work out in the morning. If you are not physically fit, or at least fairly active, then a midnight snack is not going to help you lose any weight or keep any inches off of your waistline. However, if you are going to work out the next morning, or if you had a good workout the day before, then a snack in the dead of night can be very beneficial.
First, if you are working out the next morning, it may be the only way you can get some calories before your workout. A lot of people can not eat for a few hours before they workout or else they will have upset stomachs. Thankfully, I am not one of those people, but I know plenty of them. If you get up at 3 or 4 in the morning and have a bagel before going back to bed, then you will have that much more fuel before you begin your workout at 6 or 7 in the morning.
If you had a particularly good workout during the day, and you do not eat enough after your workout, then you may have trouble sleeping because of hunger pangs. Perhaps you worked out after dinner, or you worked out twice but only had a small dinner after the second workout. If you are not able to have two small meals after your workout, and your sleep is suffering, you should try getting up and having something light before going back to bed.
Another example of when you may want to eat a little extra is when you are not feeling well the day before. Yesterday I did not eat much, and when I sat down to dinner I was feeling a little nauseous and could not eat much. I was not sleeping well at all, so I had a bagel with cream cheese at 3:30 in the morning. I slept like a baby for the next 3 hours after that, and when I woke up I had another bagel and then went out for my ten mile run. I doubt that I would have had the energy had I only had a small breakfast right before the run. The run was at least more enjoyable.
Give the old midnight snack a try and see if it works for you.