The 25th Ammendment…
…can be read here. Basically, the President gets to comeback when he says he’s ready, and it takes a majority of the cabinet to initiate a Congressional vote to prevent the President’s return. Should that occur, it takes a 2/3 majority of both houses to prevent the President from returning to office when he feels like it. It was passed by Congress July 6, 1965 and ratified February 10, 1967. I don’t know much of the history behind this, but presumably in the wake of JFK’s assassination there were concerns about preserving stability should the President be incapacitated.
The amendment also says that should a Congressional vote be required, Congress must meet and vote within 21 days (23 days if out of session), leading me to wonder what would happen if a group of legislators opposed to the President’s reinstatement blocked a quorum by simply hiding out in Canada or Mexico? [Note to West Wing writers: with Sorkin and the show’s director now gone, you may be in need of script ideas for next season. This one is for sale].
P.S. This is in relation to tonight’s episode of The West Wing, not some real-world event.