system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: Why do I fall asleep at work/school/want to be awake, but can't fall asleep when I want to sleep?
gpt
When you're doing something you don't want to be doing, your brain tries to escape by putting you to sleep.  This is the other side of being wide awake when you're doing stuff that really interests you - your brain has the energy and focus you didn't think was there.

Also, there's a part of your brain called the ARAS: the Ascending Reticular Activating System.  It's basically a novelty addict, and it tries really hard to keep you awake and going when there's things around to keep it interested.  Cut off all the stimulation and interesting things, and it'll lay off and let you go to sleep.  Turning off the lights and cutting out sounds help to stop feeding it stuff to keep it going.