I thought of writing this before Pythagorean posted, but was called away, so it might be a bit repetitive, but if they are what they seem, I have different types of dreams, including fragments, ones that stream, ones that can be forwarded and rewound, etc. Of those that seem to stream in a logical sequence of events, upon recalling them, the logic is not always so sound.
Regarding the op, I’ve thought of some more anecdotes to confuse the issue :).
On the side of dreams occurring during sleep, there is the incorporation of external sounds into dreams, interpreted as something different. For example, foxes will actually be crying outside, and I’ll dream I’m on an island where mutton birds are calling. The sounds outside may finish before I wake, and without knowledge of them, I’ll have recalled a dream with strange sounds.
However, I think I’ve also incorporated the sounds of an alarm or telephone ring that could only have just occurred into detailed, convoluted dreams, just prior to waking. As well, the sounds can seem to occur at the “right” moment (e.g. I dream I flick the car radio on immediately followed by the actual alarm music sounds) giving me the impression, once awake, that the dream may contain some retrospective elements.