The brain consumes more sugar when it's thinking harder. Before functional MRIs were invented, brain imaging required injecting irradiated glucose and scanning for radioactivity in the brain. Tasks requiring attention and self-discipline deplete glucose, and people demonstrably have higher vigilance for repetitive attention-heavy tasks when they've been injected with sugar.
This has been known to science for at least a century. The slightest glimpse at Wikipedia would have sufficed.