I've had the same question for ages. You can check this thread here:
http://www.limblengtheningforum.com/index.php?topic=64601From my understanding, you can enter on a 90 day visit that you're allowed by default and try to finish up the process within the said time and leave. If not, the doctor's office might agree to write a letter to the US government to extend your stay. How easy this is, whether you have to go to a government office in a different city (while in pain from the surgery) to get this done, I don't know. Whether they will write you this letter and help you, you will need to check with the doctor's staff. I know Paley's office is willing to help here.
If for some reason you overstay, forget about entering the US again for a long time. If you are lucky they might show you some mercy due to your circumstances.
The safest option is applying for a proper "tourist visa". You can then stay in the USA for 6 months at a time. However, if you were to apply for one, the first question you will have to answer is, why isn't 90 days enough for you? Then you will have to explain to them about the medical purpose of the visit, show proof of funds, perhaps even a letter from the doctor. It's certainly not as easy as entering on the 90 day visit ESTA visa.
Sorry for the long post, but lastly, I was talking to an American surgeon over a call about this and he was somewhat hesitant to write me any documentation to extend my stay and was instead suggesting I go back home and visit him once a month or even manage through a surgeon in my home country who he'd talk with. So that might be an option with some.
This is unfortunately the problem even in Europe. However I know of lots of people who had their stays extended in Europe beyond 90 days without much trouble.
Good luck!