system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: Why is it for some people common to think involuntarily about their most embarrassing moments when they try to fall asleep?
gpt
I read about this the other day, the theory was that the brain needs to process the bad experiences that you have during the day, but most people are far too busy to give your brain the quiet time that it needs to do this. So when you lie down at night the first thing that your brain does is think, whoa quiet time and then starts to process all of these thoughts. 

What its trying to do is to look at each bad experience and learn from it so it can be dealt with better next time. So if you want to avoid this, give yourself a 30 minute or so quiet break during the day to allow the processing to happen (avoid FB, phones etc) and then you wont get the processing happening at bed time..