I don't really have any advice, but wanted to say we experience this too with our dd. It seems to me to be based on her gaining a new level awareness re the world and/or social interactions and then needing to live with that for little a while to figure out what it means for her place in the world. I've not yet found a away to avoid it but without dropping consequences for rudeness or very poor behaviour, I try to be open to the fact that the brain spurt is the likely cause. Which at least makes me less frustrated in the moment, if nothing else!