I'm not sure if it is good to do, but I sometimes do this on purpose.
If you go to bed with food in your stomach, it just sits there in your body, causing a slight weight gain. Going to bed with an empty stomach causes the opposite effect.
I usually don't feel the hunger when I am fast asleep.
I hope this helps, especially if you're a heavy sleeper!