Not sure if it has a specific medical name. But I know it is called "The rally" or "Last spark of life" or "Calm before the storm".

It happens to most or if not every terminal patient. Unless said patient doesnt already have too much damage.

Do not remember the theory behind it though. I've heard it might be a surge of energy from patient have been resting. But I have also heard that it is because the patients body decides to "give up" fighting and all that reserve energy used for repairing etc is now not being used, thus the surge of energy followed with death 1-3 hours after.

But again, I do not know if any of those mentioned is the actual accepted theory.