I hope you are feeling ok after your surgery. You are definitely doing the right thing by getting back on plan sooner rather than later!
I had a similar situation when I had to have a 4+ hour surgery on my nose...I had previously lost 40lbs and was my lowest weight in many years. However, I was very out of it for a week, and my mom was feeding me pudding, ice cream, etc....all carb laden of course! That kicked off a carb-craving frenzy that lasted for 5 years....I regained all 40lbs and a few extra.
So don't let yourself get back into the old ways...the sooner you get back on plan, the easier it will be. You can do it!!