You may be getting the midnight munchies because you've not eaten enough during the day. Or you are eating due to boredom, stress, anger, sadness or due to drinking alcohol.