After such surgery would have thought the surgeon would have insisted on rest, any activity, even going for a wee should be on lead.
Many would advise cage rest but depends on the dog or level of control you have, ours was caged for short periods but spent most of his recovery in a basket in a small penned area, even had one in the garden so he was secure & restricted but could be with us. It really is a time too be over cautious rather than allowing him the chance however small to damage or hurt himself further. Any concerns your surgeon should be there to answer concerns or problems however trivial they might seem.