I notice the same thing in my son when I let him watch videos or play games on the computer for too long at home even without any other kids. Is that what he does when he's over at other kids' homes?
My 3 suspicions (based on what happens with my son, and I'm still trying to figure out a good way to bring him out of it / prevent it in the first place...)
* video/computer games
* tired, need a break/rest
* hungry, low blood sugar (ohh, my son gets so irritable and irrational when he's hungry/hasn't had a good (ie, not sugar) snack (my husband too!)
I do like the other mama does, I remind him that how he acts towards me at home is what determines if he gets to go again, if it's something he enjoyed.
I think it's finally beginning to work somewhat. My son just turned 8 and we've been working on this for a while now, so it may be part of the maturity/cognitive level he's reached - he seems to have just had a growth spurt too. Anyway he was invited to go join a friend for his birthday party at a play place for the day. The night before though was his scout bike hike (he'd *just* learned to ride a bike the day before that! woohoo!) so he was plenty tired from the bike ride, it was hot, etc. When I got him home, he was a bundle of tears and temper... I kept having to tell him to calm down, take a bath, eat and get to bed (it was already past his bedtime). I would add 'you seem way too tired to be able to go play tomorrow, I think it would not be a good idea if you went this tired." So, he finally gets cleaned up and into bed. But in the morning, he cleaned up! (without being asked - that day. I'd asked him for several days in a row before that!) He was polite to me. He was exactly how I want him to be all the time. So I was happy to take him over.
There IS hope after all!! :-) moms just get the worst of it - your kid is over at someone else's house, being on their good behavior, then they get home and they 'let their hair down' - think about it - we do the same thing... we grit our teeth and smile politely all day to our friends, bosses, neighbors, customers, whatever it is. Then our family does something and we snap at them. :-/ Same thing. Not ok but same thing.