Normally, extensions of one's stay in the United States are not allowed under the Visa Waiver Program (VWP). The very concept of the program is that it's a courtesy to people from countries whose citizens don't normally overstay their U.S. visas, allowing them to come to the U.S. for short stays of 90 days, and then leave afterward. VWP visitors cannot adjust status (apply for a green card) or extend their status, except in very limited situations.
Let's take a closer look at some of the exceptions here.
Medical emergencies are exceptions to the general bar on extending VWP status. U.S. Citizenship and Immigration Services (USCIS) can grant extensions of VWP stays, up to 30 days more, if you are hospitalized for an urgent matter or similar circumstances. (See 8 C.F.R. Section 217.3.)
The catch is that you are expected to show up in person at a USCIS office, using an INFOPASS appointment. Such extension requests cannot be made by mail. That might not be possible for someone in genuinely dire health. The best bet is to hire an immigration attorney, who may be able to arrange matters on your behalf.
The next best bet is to save all records of your hospital stays so that, next time you request a U.S. visa or other entry, you will be able to provide proof that your overstay was due to circumstances beyond your control. It should not be held against you, assuming you leave the U.S. as soon as is reasonably, medically possible.
If you run into changes in your intended travel schedule that were beyond your control--for example, your cruise ship can't leave Florida due to a hurricane, or your airline flight is cancelled due to bad weather or a security problem--you might also qualify for an exception to the VWP bar on extensions.
Nice try, but the U.S. government thought of it first.
If, after entering on the Visa Waiver Program (VWP) you leave the U.S. for "contiguous territory" (Canada or Mexico), the immigration regulations will allow you back in for "the balance of [your] original Visa Waiver Pilot Program admission period." (That's assuming that you're still eligible to be let into the U.S. at all—that is, that you are otherwise admissible and meet all the same conditions as for your first VWP entry, such as being financially solvent and having a return ticket home, with the exception of the requirement that you arrive on an authorized, signatory carrier.) (See 8 C.F.R. Section 217.3.)
Legally speaking, you will not be seen as having made a true exit or reentry, but only an "authorized departure" under the program.
So, for example, if you have already spent 60 days in the U.S., then leave and return after ten days, you will be allowed another 20 days to finish out your VWP stay. Your ten days outside the U.S. will be counted against the total 90 days.