Why do you sleep and dream at night and wake up in the morning knowing that you are dreaming and not knowing what you are doing?
It's normal that you can't remember your dreams. People fall asleep, in fact, part of your brain is still working, so you may dream. Maybe you will say that we can't have a good rest in our dreams! In fact, we are resting when we dream. Even if we had a nightmare and a very nervous dream, we were taking a different kind of rest, so we don't need to care about it. I'm glad I can dispel your doubts. When I was in high school, I often had such questions. Later, our class teacher also said so, and I felt much more relaxed.