Friend, it is possible the gagging you are hearing at night could be related to inflammation in the airway secondary to having the endotracheal tube placed for anesthesia or he could have an upper respiratory infection. As far as the stool, when we see soft stool this is a sign of inflammation in the colon, it is possible this could be related to the antibiotics. As far as the increase level of activity, this is not related to the surgery, I am not certain why he is doing this, I am sorry.
This is what you can do for the stool and gagging:
1- Do not give things like Pepto Bismol or Imodium.
2- Keep him on a diet of rice (75%) and boiled boneless chicken or ground beef (25%) until the stool is back to normal then wean him back into his regular diet.
3- Supplement with a probiotic, these are friendly bacteria that help with regularity. You can buy this over the counter in any pet store.
4- Robitussin DM (cough) 1/4 teaspoon every 6-8 hours. You can buy Robitussin DM (cough) over the counter in any pharmacy. Do not buy sugar-free.
5- If no improvement after doing the above in 1-2 days I would have him checked by your family veterinarian for a hands-on examination.
My goal is to provide you with excellent service - I hope I've provided the information you were seeking, if you feel you have received anything less, please reply back as I am happy to address follow-up questions. Kindly rate me when you are done.