Chocolate have different kinds, as well as different effects to our system.
Milk chocolate will surely keep our senses awake. Never eat them at night. It is better recommended for our active daytime lifestyle.
However, dark chocolate is the exact opposite.
DARK CHOCOLATE contains the chemical serotonin. It makes our body relaxed and our mind at ease. Basically, it induces sleep.
So it's not actually bad to eat chocolate at night, as long as it's dark chocolate and you would not forget to brush your teeth afterwards.
"Sweet" dreams!