system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How does mental fatigue work?

Something like when you are doing a really hard and long test or just learning too many things at once and your mind just stop out of nowhere.
gpt
A popular hypothesis these days is that your brain runs out of the neurotransmitters that your brain cells use to talk to each other. When you rest (e.g., sleep), your brain cells have time to make more. Caffeine, amphetamines, and other stimulating drugs work by promoting these transmitters.

Also, your brain runs almost exclusively on sugar (unless you are starving/on a keto diet). So if your blood sugar is low, your brain feels tired because it doesn't have enough fuel to work properly. So eating a little candy or drinking a little bit of a sugary drink can help perk your brain back up.