Potty training/tonsillectomy

My 2 year old has been (mostly) accident free all day and during naps for weeks now. He has to get his tonsils and adenoids out and tubes put in his ears in 2 weeks. I know we will probably get set back a bit and that’s perfectly fine, I’m not worried about it. What I’m wondering, is if I should just keep him in diapers for the first few days. I assume he’ll be sleeping a lot, but I’m just not sure if the best thing to do would be to keep him in underwear like normal and risk it, or put him in a diaper so none of us have to worry about it. I don’t want him to have to think about waking up during nap to pee, or how much pain he’s in and he just wants to lay down, but he has to get up to pee.

Any thoughts?