When you wake up...
Well... unless the DM is
really trying hard, it's unlikely that all party members are actually past -10 HP. If necessary, I personally would probably fudge a little to prevent this from happening.
Also, with a TPK (even if not everyone is truly dead, but might as well be), I would ask the
players which route they want to take: new characters, new game, or.... try the following scenario...
Have some or all of the PCs declared "merely unconscious" (above -10 HP), and they wake up imprisoned by the bad guys (or hanging upside down to be eaten later, or perhaps simply stranded somewhere) Jailbreak adventures are always fun. The bodies of any truly dead party members might be kept nearby, to be questioned by the BBEG with Speak With Dead (or stored for food...), so they could be recovered for a Raise Dead.
Players of dead PCs could either play new PCs attempting to rescue survivors (or temporary NPCs, in the event their original characters are raised.) With the right group of players, the players without characters could even play NPC villians attempting to prevent the survivors from escaping.
As "penalty" for getting themselves all killed, I wouldn't allow the party to recover 100% of their gear, if they escape. Knowing the BBEG has
your magical shield strapped to his arm can be surprisingly motivating for a character
So, if you think a TPK is possible, you might think about a "when the party wakes up..." scenario, and go from there...