Ok, what you are describing in the same paragraph are two different things.
I will give you what I know and you can take it from there.
Deja vu is when you see or feel something you've already experienced. For example (walking into this room and saying this sentence or the dog barking and then the red car at the stop sign) Deja vu usually happens no longer than a minute.
Now, another thing that you had described was foresight. You would see something in a dream right before you wake up. These are called visions my dear.
I suggest you begin your dream journal at this point or your vision journal. I also recommend you begin simple mediation practice if you have not already. In doing these things, they will help you remember as well as find control within these happening.
Best of luck!