What's the clinical term? Inner rehearsal? Internal rehearsal? Something like that. Yeah, many neuro-atypical people do this . The theory is that our brain is seeking to overcome our social deficits and so we "rehearse" socializing in our head. So it seems like we're talking to ourselves.
I think there's something to that theory, because I often replay social interaction after the fact, like tryng out alternative endings. Sometimes I find myself rerunning same theoretical social situation over in my head (i.e.daydreaming), changing what I would say or how I'd emotionally respond. Sometimes I'll even do hand and facial gestures as well as talk to myself. I just do it like second nature. But I'm pretty self-conscious about it, becuase I grew up with an older brother who'd mock me when he caught me doing it. He still does and we're both well into adulthood. My brother's a jerk, that's another story.
But yeah, we do it. Not just people with autism--I've known dyslexics and people with tourette's and ADHD who do it too. I think any developmental condition that might result in social deficits can prompt this--I think because we are by nature social beings, and our brains do need to socialize. It's just our brains trying to figure things out by trial and error that NTs would figure out more intuitively.