If your glucose is too high, and you cannot lean on the exercise department to help lower it, then the next step is to discuss medication options with your healthcare provider. The pain associated with surgery could be the cause for your higher glucose levels. Once you are back on your feet, your medications would be adjusted again.
Make sure you stay hydrated by drinking enough water and keep your pain controlled. That will help your glucose levels by preventing dehydration and reduce the potential glucose spikes associated with pain.