Part of it is the age. My son started going through cycles like that around that age too. He's testing to see how far he can go and what he can get away with. I think it is pretty normal. He is trying to come to terms with becoming a young man vs. being a "little kid". My son is almost 12 now, and I still get some of this, but it is much better. He is starting to realize that a lot more responsibility comes along with more privileges.
Does your son have any regular chores around the house? If not, it's time. Our son's first was taking out the kitchen trash... not just once a week or something... but EVERY TIME it gets full and needs to be taken out.. it is HIS job to do it. Doesn't matter if it is dark outside either... we have flood lights. Just like our daughter's (younger) is taking the recycle items out to the garage, including the newspaper from the newspaper/magazine rack.
When they actually have concrete expectations placed on them, they tend to come through. And they feel a sense of pride, accomplishment and contribution to the family, that helps with some of those attitude issues.
Oh, and CALL him on it! Tell him that he can leave that attitude in his bedroom, because you're his mother and he will treat you respectfully like a son SHOULD treat his mother. That you will not accept less. Being straightforward about it with my son goes a long way... long winded conversations about why he is acting that way and what to do to fix it go NOWHERE.