Happens to me quite often as well. I guess that it may just be an idea that just appears spontaneously in your mind and forces you to think about it. And when you think about lucid dreaming, chances are that you will have one.