That is interesting, and a good expression. The term for this that I know from hip hop culture is “code-switching.” Generally it means turning off ebonics or curse-words or just hip-hop-specific slang when speaking to family, teachers, cops, the pious, old folks, white folks, etc as the case may be. But, I had a black friend here in Atlanta that had lived in NYC and he used the term to define how he could go from sounding like Wu-Tang et al. to more normal-sounding (for here), even though his audience here was also black and of the hip-hop generation; i.e. he code-switched different types of ebonics.
a few things I’ve written on this thread-topic:
Thoughts on perception of US southern accent as ignorant
Noticing my particular vernacular changes
A blogger married a southerner and wrote a bunch of great stuff about trying to learn the accent. the comment section has years worth of folks chiming in with regional pronunciations and idioms, too.
also, this book is awesome:
https://www.goodreads.com/book/show/1616284.How_to_Speak_Southern