I used to eat A LOT during the middle of the night. I think it's how I gained a lot of my weight. I had to force myself to stop when I had gestational diabetes, as eating in the middle of the night would affect my morning blood glucose readings. I made it through the last trimester of pregnancy that way, but after my son was born I relapsed and started again.
Jacob is just 2 days from turning one year old, and I have again successfully broken the night eating habit. First, I simply closed my bedroom door. That is a visual cue to me that if the door is closed, the kitchen is closed. I take a bottle of water with me to bed, and drink it if I wake up. I also take an OTC sleep supplement called "Midnites" which helps me stay asleep so I don't wake up, hence I don't have the problem.