When I was in high school, there was a situation where you really wanted to solve this problem during the day. Of course, you know the topic by heart, and you think hard before going to bed, and sleep is also in the process of thinking.
When people go into deep sleep, their eyes beat very fast, because people's thinking speed is very fast at this time, which can be said to be browsing and retrieving information from the epidermis of the brain. It is for this reason that you solve problems in your dreams.
It's just a few minutes after waking up.