Well funnily enough low blood sugar levels can cause insomnia, this relates to excess sugar intake in some people. Huhhh you say?? a normal persons body produces insulin in reaction to sugar intake which increases excretion of the sugar and regulates blood sugar levels but some people overproduce insulin after eaing sugar and this leads to the low blood sugar after a few hours.
It could also be that sugar gives you a sudden energy boost. I teach, and the kids after breaktime are completely MANIC because they have just filled themselves with sugar and are buzzing. I would avoid sugar before bedtime; you could always have green and black's hot chocolate, which is organic and made from 70%cocoa rather than nasty cheap white sugar. It might help...