The post-meal time potty break is usually not to eliminate the food and water just consumed. It is to eliminate what was taken in earlier.
Whenever a dog wakes up, he is probably going to feel the urge to eliminate. If you get up during the middle of the night, you should probably take your pup out to do his thing too. As he matures, he may not need this as much.
You could also try increasing the frequency of potty breaks throughout the day. That may help his need at night.
Be sure to praise every single time he potties outside where he should. Maybe even give him a small treat. Don't scold for accidents. Maybe just say, "uh oh" in a non-scolding way and then forget it.
Although I use pads in addition to outdoor potty breaks, I still praise my 2-year old boys every single time they potty in the right place. I act very silly about it, "Woohoo! Way to go Max!"

The boys love it and I firmly believe it has a lot to do with our success.
Best wishes to your boy for a speedy recovery after surgery.