Probably has to do with state-dependent memory or the fact that during sleep serotonin, histamine, and norepinephrine completely or nearly completely quit firing... leading to memory "hiccups". When lucid, it's a decent guess to say that, to some extent, these neurotransmitters begin firing more.