The "system 1" itself hardly understands logic and requires little brain power to run. Even you can't take the initiative to shut it down. If you don't believe me, try to do meditation training, close your eyes, slow down your breath and try not to think about anything, but you will find that all kinds of thoughts will enter your brain completely unconsciously, and you can't shut down the system from the background 1. Its working mechanism is extremely complex, and it runs autonomously. The other of the two brain systems, system 2, needs the brain's concentration to work. System 2 will focus on brain activities that require brainpower, so as to logically understand, think and judge problems, such as attending classes, understanding the rules of new games, listening attentively to friends impart some knowledge that you didn't know before, and doing complex operation problems, just like judging the rationality of things in dreams in the landlord's questions. This brain-consuming, slow-running system 2, which can't run for a long time, must concentrate on running, and once the attention is distracted, the operation will be interrupted. Many times, people's brains are thinking, such as whether to eat, how long to sleep, whether to turn off the lights, which restaurant to eat tomorrow, whether to order mosquito-repellent incense and so on. These problems that can be solved by simple reasoning and imagination based on experience in the system 1 do not require mental work, and they keep jumping into such problems. ).
Basically, I think system 2 doesn't work when dreaming most of the time. Otherwise, when you sleep, you always concentrate on thinking, and that person will definitely not live the present life. You will find that even if you sometimes suffer from insomnia, there are always many problems in your mind that make you toss and turn in bed, but those problems actually flow into your brain unconsciously, which is why the system 1 is unusually active and causes you to fall asleep. It has been found that the operation of the concentration shifting system 2 can inhibit the operation of the system 1 for a certain period of time. For example, if you really can't sleep because of the system 1 and concentrate on operating system 2 to count sheep, then other distractions will be temporarily replaced by system 2, which requires you to concentrate on counting sheep. This is also human experience. When operating system 2, your brain will be occupied by focused tasks, so don't play with your mobile phone when crossing the road.
To sum up, I think that the 1 system is operating during dreaming, and insomnia is also disturbed by the 1 system. However, because people are awake during insomnia, System 2 will not be mobilized for further thinking because an idea is focused. Therefore, the influence of insomnia on the mental state of the next day is definitely greater than that of dreaming. Here, I simply talk about two systems widely used in psychology from the perspective of memory. If you want to know more advice, you can go to Daniel Kahneman's thinking, fast and slow.