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 or less and then leave afterward. VWP visitors cannot adjust status (apply for a green card within the U.S.) or extend their lawful status, except in very limited situations.
Let's take a closer look at some of the exceptions to the required 90-day departure period here.
Medical emergencies are a potential exception to the general bar on extending VWP status. U.S. Citizenship and Immigration Services (USCIS) can grant extensions of VWP stays for up to 30 days more if you are hospitalized for an urgent matter or encounter similarly serious medical or health circumstances. (See 8 C.F.R. Section 217.3.
Such extension requests cannot be made by mail. You will need to call either your local CBP Port of Entry or Deferred Inspection Site or the USCIS Contact Center. Have your passport number ready. Or, you might hire an immigration attorney 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 a pandemic, 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.
An experienced attorney can assist with the task of figuring out how best to allow you to remain in the United States longer than your 90-day VWP limit and help prepare any required paperwork.