sometimes while i am in a dream, usually one in which i have to figure out something or do something. ill use an example, a few nights ago i had a dream which i was in a house and a massive tsunami was coming and it would completely cover and fill the house, and some of my friends were with me aswell. somehow, while i was in the dream, i knew exactly what i had to do, infact i remembered doing it before. i was thinking about what i had done before, then i did it, but differently than what i did before as would happen in real life, you do something, then the next time you do it, it isnt the exact same thing you do. so i know it wasnt some sort of dream deja vu.

when i woke up, i thought to myself this "oh, i remember when i had that dream a while ago... oh, wait a minute, i dont remember dreaming that" and so on.

sorry if you cant follow what i was saying, but if you could, can you please tell me what was going on.