On Thursday, there was a parliamentary answer to a question from Conservative MP Peter Bone:
Peter Bone: To ask the Deputy Prime Minister what responsibilities he has in the event of that the Prime Minister is incapacitated and unable to carry out his duties. 
The Deputy Prime Minister: The Prime Minister remains Prime Minister at all times but arrangements, appropriate at the time, would be put in place as necessary, as has been the practice under successive administrations.
This rather side-steps the issue of what happens in the event of the demise of the Prime Minister. The last PM to die in office was Palmerston, but two Labour leaders have died in Opposition (Hugh Gaitskell and John Smith). Furthermore, the issue of what to do if the Prime Minister died did arise under Sir Winston Churchill when he had heart attacks (the most serious when his obvious successor, Sir Anthony Eden, was also hospitalised) and at the time of the bombing of the Grand Hotel in Brighton in 1984: initially the Cabinet Secretary did not know whether the Prime Minister had survived the attack.
The question of what to do in such circumstances came up when four former Cabinet Secretaries gave evidence to the Constitution Committee in the Lords earlier this month. Both Lord Armstrong and Lord Butler referred to the events in Brighton. Lord Turnbull, knowing of my research on the subject, very kindly referred to me as the expert on the matter.
The problem is that the constitution has not kept up with the practice of the parties. Election of a leader by the party membership takes time. If the PM dies, what happens in the interim? A Deputy Prime Minister has no status distinguishable from that of another Cabinet member. Could an interim PM be appointed? There is no precedent for one but no bar on one being appointed. But for whom would the monarch send? Could the Cabinet agree on someone? The problem would be in finding someone with sufficient seniority but who may not be a candidate for the position permanently (since it would likely give them an unfair advantage in the contest). Such a person may exist on occasion but there is no guarantee that there will always be someone available on whom the Cabinet could agree.
Failing that, what does the monarch do? The whole point of drafting a chapter of the proposed Cabinet manual before the election, covering what to do in the event of a hung Parliament, was to keep the monarch out of any political controversy. How, then, to ensure the monarch is not dragged into controversy by having to take advice and send for someone to be an interim PM if the incumbent dies? What protocol could keep the monarch at arm’s length from making a decision? The former Cabinet Secretaries were agreed that there should be some rules agreed – but equally agreed that they should not be in the draft Cabinet manual. The difficult part is generating and agreeing the rules.