There are reasons for dreaming, but there are three reasons for dreaming.
First, yin and yang become dreams. This point was discussed in Huangdi Neijing, and I also explained it when I answered the first two questions about dreams. Not much to say here. If you are interested, you can look at the first two questions. Combine this answer.
Second, reality has become a dream. "Donglai Class Theory" said: "When things touch, they will become things, and when God meets, they will become dreams. Flying futile dreams, dreams indulge in reality; I dream of snakes when I sleep, birds when I wear a towel, flying when I hold my hair, water when it rains, and fire when it is sunny. If you are going to get sick, you will learn something about eating dreams; If you are going to be sad, you will dream of singing and dancing. This is just as Liezi said, when God meets a dream, his shape follows things. So, I think about it every day and dream at night.
The third is the failure of dreams. Sun Simiao, a famous medical doctor in the Tang Dynasty, wrote the book "The Theory of Regulating Mind", saying: All dreams are because the soul is confined in the body and cannot flow. At night, when the soul is quiet, God will tell the future good luck or bad luck, and the dream will come true. I dreamed of a distant place before midnight, and I dreamed of a nearby place after midnight. Do you think so?
Liezi believes that there are eight signs when awake and six signs when sleeping and dreaming. These eight signs refer to: first, continuing to do unfinished business; second, doing new things; third, gaining; fourth, losing; fifth, being sad; sixth, being happy; seventh, multiplying life; eighth, dying of casualties. These eight situations are all manifestations of physical contact with foreign objects.
There are six omens when sleeping: first, dreaming under normal circumstances, second, dreaming under fright, third, dreaming after missing deeply, fourth, dreaming after waking up, fifth, dreaming with pleasure and excitement, and sixth, dreaming with fear. These six omens are manifestations of the resonance between spirit and external things. I don't know how the change of feelings happened. When things suddenly come, you will be very lost. If you know how the emotional changes happen, you will understand the reasons. It's not surprising to know why.