Here you are lying on your bed wanting to sleep as you feel sleepy yet can't due to the overflowing of thoughts in your head.
Thinking of several things at the same time. Thinking of the past, what you could have done better, what would have happened if you did this or that. Thinking of the present, what you are doing in your life, what should you be doing. Thinking of all possible futures if you do this or that. Thinking of past events that you saw coming yet acted as if you didn't understand what was happening.
However there are some situations that you wanted to prevent from happening unfortunately you couldn't do anything thus making you fall into despair due to the feeling of being useless.
It's a curse, the curse of overthinking.