See, we have dozens of unremembered dreams every night. Most of these are dreams of mundane, frequently done tasks. The Deja Vu you're experiancing is most likely the result of having dreams where you're sitting in class doing something, followed by you sitting in class doing something somewhat similar in real life. Your brain realizes that you've seen something similar to this and tries to figure out what it is. It vaguely remembers the dreams you've had, and either picks one similar to this, or mashes up a bunch, tricks you into thinking that you saw this exact moment before, and makes you think you're psychic.
Happens to a lot of people, which is why Deja Vu is such a common expression.
Happens to a lot of people, which is why Deja Vu is such a common expression.