This happens when you are about to wake up. You are aware you had been dreaming and can remember what the dream was about. Very rarely, you might experience being in the middle of a dream, and see that you are dreaming. There are two layers of dreaming. This is complicated. You are not ready to acknowledge what your inner consciousness wants to tell you. Thus, the brain invents the double dream. On one hand, it wants to hide the true latent meaning of this communication. On the other side of the coin, the brain wishes to tell this important message in a method that may receive acceptance.