For what I know about dreams:
During your sleep, your soul leaves the body and wanders around the world (this world or the other world, I do not know). So your soul sees the truth always, During the return of the soul to your body, Shaytaan interferes and tries to confuse you so the memories got mixed up. sometimes he manages to mix it up a lot and sometimes a little. so, when you wake up, you will remember it as a dream but to which level it contains the truth...you do not know.
I might be wrong on this one. if so, please correct me.