system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5:Why do I have so much trouble staying awake in class yet the moment class is over I no longer feel sleepy?

So I'm sitting in lecture and it is sooo hard to keep my eyes open when the professor is talking yet as soon as class is over I instantly feel awake. Why is that?
gpt
Because sleep is directly tied with brain activity. When you are sitting in a class (especially one you are not interested in) your brain has very little to do. You have 60 minutes +/- to sit there and take in information from very little sensory input. Combined with almost no physical activity you can see how this starts to mimic sleep pattens. Get comfortable in a location, reduce/eliminate physical movement, shut down creative, problem solving, and decision making areas of the brain, add white noise via the teacher, and you have severely reduced brain activity.

In contrast once you are leaving, you have physical activity, social interaction, decision making, planning, and a host of others things kick back on line.