Maybe the FO slipped something into the Captains Coffee to ensure that the Captain needed to go out.
Whilst I agree that under normal circumstances one wouldn't leave the flight deck during climb or descent if I had a stomach issue I would try and leave it at close to TOD as possible as I would't want to have a desperate need whilst on final approach.
Sometimes the bodies needs overrule the best laid plans.