You've had a spontaneous lucid dream. Congratulations on that.
I don't think there is any explanation for such occurrences. It's like asking "why did I dream about X?". It could be because of events that happened during the day, or because of something from your past, or because of something rooted in your subconscious, or perhaps something seemingly random that defies logical explanation.
Bookmarks