Surprising not to see this in the comments, but sweets actually do help brain function. If you happen to be at the tail end of a particularly rough all-nighter, a cup of coffee and a sugar bump can get you through the tail end of it. It's almost like your brain comes back to you.
Probably won't...