I go to bed when I have this, or I go to drink tea, and then go to bed)) Well, in general, it's right that at such moments you need to lie down and think about what you can change / add / change in your life , sometimes something useful is born in such thoughts
The old old-fashioned way: take an iron fork, two carnations, some soda and go to work, the factories are standing, the country doesn't produce anything, there are only startups around.
Go after your boredom. Trust it. Observe yourself. Perhaps this is not boredom, but time for reflection or rest before a dash. Or hanging between desire and obligation.
The simplest solution to this problem is to take a horizontal one and start thinking about the meaning of being. These reflections will be so exciting, and being so interesting and meaningful, that you will fall asleep under the weight of heavy thoughts.