I too have no idea if waking up during surgery is related to the infections that I had - but I do know that it freaks out everyone else in the surgery suite!! LOL!
I've woke several times during surgeries, and during a knee surgery, I tried to sit up! I can remember them all screaming "Get her down, get her down!: LOL!
I never did respond like 'normal' people to the pain meds either. I went in when my appendix was leaking and ready to burst and they said they gave me the full amount of morphine that they could and I got up and walked around - they were all a little slack jawed, but I had to go to the bathroom!!! LOL!
I do know that surgery is a tremendous strain on a healthy body, and most of us are a long way away from having a healthy body! So expect to have issues that most people don't have - increased symptoms, flares, set backs in treatment, getting viruses and other infections even, as the immune system will be even lower functioning.
It's best to avoid surgery until you are healed, but that's not always reasonable, so do your best and remember that you will need a lot of time to recover!!