If you recall, every stage of development has regressions. They always do before a giant leap forward. The only thing you can do is be supportive while he works through it.
So, do not make a big deal out of the accidents. If he is having a lot of them, simple tell him that he has to go to the bathroom before he can sit on any furniture in the house. Tell him, "pee and poop ONLY go in the toilet, and until you are totally responsible, you will need to go to the bathroom and at least try to empty yourself before I can let you sit on the furniture." Also tell him, "if you can't be totally responsible for your body, then I will have to take responsibility for you. It's your choice. Either you can take full responsibility or momma will." Then simple tell him, "until you've shown me you are responsible, momma will be taking you to the toilet."
My daughter trained at 21 months. She is now 31 months, and yesterday she didn't make it to the toilet, she got pee on the floor of the bathroom. I say she trained at 21 months, however, because that is when she finally started going poop in the toilet and that is when we moved her to underwear at night. After that point, she only had 2 more poop accidents and about 3 night accidents. 10 months later, and she still has "big accidents" every 4-6 weeks or so (she went on the floor of the play room last week).
2 year olds are busy playing. They get easily distracted. They think they can hold it a bit longer. They mistime it frequently. They also are trying to figure out rules, and if they always apply or if they are flexible. It sounds to me like your son is testing, on top of a perfectly normal regression that should be expected with big change. My daughter had a regression after my son was born that consisted of "he has accidents, it's OK for me too mommy." I simple told her, "no, it isn't OK. Babies go in diapers, big girls put their poop and pee in the toilet, like mommy's and daddy's." It worked.
Hand tight. Just stay positive and remind him, "pee and poop go in the toilet, and ONLY in the toilet. You are a big boy now."