Yes. I've been doing it off and on since I was 13, I am now 60. The primary daydream was an alternate world, alter-ego scenario. It wasn't until I analyzed the relationship between my alter-ego and the people I created in my world, that I could see that I was using it to try and figure out and deal with the people I knew in this world: i.e. problems with my mother. Once that happened, things began to change and I am mostly now in this world

. Good luck.
You're also right about loneliness being a factor; also insecurity and lack of self-esteem.