OUCH! Guinea pigs NEED to eat and can eat right up until you take them to the vets - rodents don;t have a vomiting reflex unlike bigger animals (which is the reason for the fasting). Have some little treats ready; his favourite foods or things like parsley and cucumber.
Make sure that you insist on getting Critical Care or some other hay based powder for syringe feeding in case your boy is slow in recovering when you take him back. Usually they get enough pain killer to last them for 24 hours after the op, but ask for some metacam for the following days. If he gets prescibed an antibiotic, ask for probiotics as well, so he the gut keep moving. Due to the fasting, there won't be much pooing and peeing for some time and poos can be a bit funny at first. Things should normalise when he gets going again.
Some boys come round with no problems, others will take a bit longer. Please weigh your boy daily until he is recovered. Look out for signs of infection (swelling in the operated area).
Best of luck!