This happens to me a lot. I find this periodically as I recall.
For example, have you watched anything on TV in a dream, and suddently found yourself in the environment that the TV was portraying, without even knowing it? This happens when I play videogames in TV as well.
Once I get more Lucid, it can prove as a nice way to create scenarios.