Dopamine, the "desire/ reward" chemical may be to blame. Specifically, when you go through Dopamine withdrawal, your body craves more. On of the easiest ways to get Dopamine is to eat, as your body likes food. Sugar usually forces huge amounts of Dopamine to be produced, so its withdrawal leads you to crave more. Its the oldest addiction con: survival.
Our biology is set up to crave carbs in the evening (when we are resting) so they will be stored. What's more, as our Serotonin levels drop, our ability to maintain self control also ebbs; so you may end up nibbling on some sugary goodness, only to find yourself hungrier as soon as the Dopamine kicks in and begins to fade.
Source: "The Neurotransmitter Revolution: Serotonin and the Law"