sleep and deja vu are different phenomena.
deja vu (literally from French - already seen) - in reality experienced feeling that you are in a "time loop" - that you have already been in this moment, you know, what will happen now and how will it end. sometimes a frightening feeling, if honestly. I once had a case that I started watching a movie, and after watching for 10-15 minutes, I didn't understand what the joke was, I was surprised, said that it was new at all film, I saw it for a long time and retold the whole plot. They looked at me like a green man - it turned out that the film was shot less than a year ago, and it was shown on TV for the first time. what it was, I do not know.
the fact that you do not remember dreams is physiology. woke up in the wrong phase.
but déjà vu in a dream is even stranger. further only their experience and assumptions. For a long time I had dreams in which there was déjà vu - I suddenly realized that I had already seen this event, and what would happen next. as a rule, such dreams are rather disturbing, sometimes frightening. at the peak of my emotions, as a rule, I woke up. and then such cycles ended, as a rule, with one dream, in which the ending changed - something terrible that should have happened did not happen, or something good happened.
my guess - such dreams indicate that that there are some themes / problems that you constantly repeat in reality, and that you cannot yet solve. maybe there is not enough experience, wisdom or something else, some resources. the psyche, in order not to give these problems too many of its resources, drives them into the "tray" - the subconscious, which is trying to solve them in an invisible mode. in any situation in reality that is somewhat reminiscent of this problem, driven there, this "process" makes itself felt as another dream-déjà vu. as soon as you find in reality a way to solve this issue or the situation is somehow resolved herself - you see such a dream again, but with a different ending.
Déjà vu is not related to what was seen in a dream. Deja vu (French déjà vu - "already seen") is a special state in which a person thinks that he has already been in a similar situation and even seems to be knows what will happen in the next moment.
Several times I had a feeling of déjà vu and this is a very vivid impression, the feeling of which has not disappeared. For the first time this happened when I was told about the tragic and ridiculous death of one acquaintance, I sat with the feeling that they had already told me this and I do not understand why they are telling it again, word for word, and I know what will be said next, all the details, etc. It’s hard to describe, but it felt very strange. Then it was repeated, but the brightest deja vu is this, the very first.
As for memories from dreams, I sometimes had situations when it seemed to me that I saw this in a dream, but subjectively it differs from deja vu, because during deja vu the matrix really hangs in your consciousness and you do not think that it was in a dream, because it seems to you that you are one step ahead of this reality, and not just in a similar situation or vaguely remember the situation.