A lot of the writing I do is without a pen or a keyboard; it's done in my head. The problem with that is the risk that it never gets out of my head. I may get distracted by other people or other things I have to do. But sometimes I just nod off while planning these things out.
Though I've never thought of myself as a daydreamer, there are times when it is very easy to get lost in the fantasy worlds we create. All of a sudden, I find myself far down the path, but have no memory of how I got there.
I don't know that there's anything that can be done about this. The best advice is to work on willpower or to create some tricks to be able to type those daydreams as they come to you. Of course, it may become boring, being the stenographer of events instead of a more active participant, but at least this way you'll have something to show for it.
You also leave yourself a little present. You may not even remember half the things you just daydreamed about. That's when that written record is pretty handy (when it makes sense).
I'm not saying you shouldn't daydream. It's a great thing, especially when you want to start understanding or exploring your characters and settings. Just don't get lost in thought.