Thank you for writing. I’m sure you were very, very curious and maybe a bit alarmed when this happened. Unfortunately, I can’t really help you without talking to you at length. The explanation could be as simple as that you have an active imagination. Or it could be as complicated as a symptom of Dissociative Identity Disorder (DID). Or something else.
If this was a one time event, I’d be inclined to just let it go. But if this has happened to you more than once and you are distressed by it, I think it would be wise to talk to a mental health counselor, if only for your own peace of mind.
A mental health counselor has the time and training to ask the kinds of questions that will help determine what may have happened.
I wish you well.