Oh my goodness, there's a name for this! This literally ruined my life as a teenager, I got so into it. I'm putting my story here so hopefully people will learn from my mistake and not also get too into it.
I hated my life as a teenager. I had SA back then and got made fun of and bullied constantly, so I started daydreaming a good life to combat my anxiety and depression. When I came home from school I would go right to my bed and lay down on my back and go into my little headworld. I'd usually act out certain things using my hands or my facial expressions without realizing it (making kissy faces and huggy hands during a romantic story, yep)
I had characters with deep intricate personalities and I'd often put them into situations with characters from my favourite shows (at the time I was just getting into anime, so it was mostly Sailor Moon and such) They'd live out whole lives, and I'd put in drama around every corner, and I would just lay there all evening and night. Sometimes I'd play music on my headphones and daydream of karaoke bars or concerts. Once the next day came, I'd put my story on pause, go to my classes thinking about nothing but what things I'd do with my characters next. I'd forgo things like dinner and homework, only to have a feast with the "family" in my head. When one story ended (usually after a month) I'd start up a new one from the beginning.
I withdrew more and more and soon I was drawing out my characters and floorplans and entire maps of planets and wound up with a set unchanging universe with a story that didn't end. One day I was sitting in class and I could hear their voices, clear as day, and soon I began to see my "friends" walking next to me and doing whatever in the physical world even when I wasn't daydreaming. I couldn't turn them off, but they would talk to me and I felt it was "better for me" since I was actually in the real world rather than daydreaming.
Soon some of my more villainous evil characters popped up and I started freaking out and unable to tell their voices apart from those around me, so I knew I had to put a stop to it before I went into full-on schizophrenia.
Long story short, I went to see a psychologist and he worked with me to help me stop daydreaming so much, and once I stopped daydreaming the visual and vocal hallucinations began to fade. Nowadays I still daydream, but I'm very careful and keep a strict time table. One hour of daydreaming either in the morning by waking up early, or at night by getting into bed early. It's my little meditation time. Most of my daydreams are short stories that last only one or two days now, I'm afraid to go for longer, and they usually involve ideas I come up with for my fanfiction for Doctor Who, Supernatural, or Sherlock
Other times, if I've got my headphones on, it's just me flying to music or riding dinosaurs across the tundra to Bach or whatever.