Could be several reasons; yes, he could be trying to get attention, but since they are new cousins and not new siblings that seems unlikely (though it could happen). Some children regress a little big as they get older, for no apparent reason, and then come out of it. What Becka M. said is true too; some kids grow faster than their bladder, have small bladders, etc., and can't hold it as long (one family I know dealt with night-time bedwetting until their kids was at least ten; then his bladder was finally big enough to hold it all night). Some kids get so absorbed in what they are doing that they forget to pay attention until it is too late (I also knew a child like this; a friend, who is now a wonderful, perfect adult!). :-)
Going #2, though… either A) he is just acting up (for who-knows-why; he's a child), or B) he is waiting too long and then all of a sudden the urge hits, he can't stop it, knows he can't make it to the bathroom, and hides, embarrassed.
3 times in 2 days? Was he constipated before? Had he not gone for a long time? Again, I knew a child who had not gone for DAYS and DAYS and then all of a sudden he just went and went. Not accidents, but he was a little older (by about a year, year-and-a-half).
If the problem with #2 persists, maybe set up a checkup with your doctor, just to be sure. If it's nothing, then go back to 'training mode' and re-train him with patience. Maybe it is attention getting, or he just regressed a little.
I hope this helps! I will pray for patience and an end to what must be a frustrating time for Mommy!
God bless!
M. D