Well it all depends on the lengh of the flight, as in distance to nearest suitiable airfield. This is the best way I can answer your question, so please bear with me
* Grab other crewmembers attention (Usually call bell 3+ times in rapid sucession
* Check ABC (Airway, Breathing & Circulation)
* Request Oxygen, Defib, Resus Mask & First Aid Kit & notify Purser & Captain
* Remove person from seat
* Start CPR
(While waiting for equipment)
* As equipment arrives get it ready (set up Defib, remove clothing to attach pads, set up oxygen)
* If no pulse use Defib & follow commands
If the passenger comes to, leave pads attached, to their chest (disconnected from machine), leave on oxygen. Aircraft will already be diverting.
If they don't come around & there is still no pulse continue CPR
& follow DEFIB commands.
As the aircraft starts approach the passenger should be back in their seat and all equipment stowed (offical rules) however, in all honesty the a (non mandatory) crewmember (with no door responsibilities) will wedge themselves in a gap next to the person to continue (with passengers holding them all down. The DEFIB will not work at this point as the aircraft will be bouncing too much.
Now on a long flight, the same principle applies however you are allowed to discontinue CPR
after 30 minutes have elapsed, however if 1 crewmember wishes to continue then all involved crew must continue. If there are family members present and they really want you to go on, its hard to say no so usually the crew would continue.
Those procedures are for when somewhen dies there and then.
When its clear someone has died in their sleep and nobody notices until a few hours after the event, procedure is to leave the person in their seat, wrap them in a blanket up to around the chest as if they were sleeping. It is possible that for other passenger comfort that oxygen be brought and a mask placed on the person but with no flow. This is to avoid upsetting other passengers. If the family wish to they can sit next to their deceased relative for the duration.
Deaths on board are traumatic for all involved, fortunatly I have never experienced one in my 2 years of flying but I have come close, having been taken off a flight in which someone later died and also having operated the next flight following a death on board. The airlines are excellent at handling these events, and as the aircraft returns home the crew will be met by the base managers & will recieve any support they need. They are asked downroute if they wish to bring the aircraft back or spend some time downroute while a fresh crew is positioned in to bring them back.
Unfortunatly however government agencies are not as comforting to the involved parties, with crew having to speak to the coroner (still on the aircraft next to the deceased) & swear on the bible, give lots of statments to the police.... Of course thats only downroute, but is still unpleasent.
I hope that has answered your question.
Lifes a train racing towards you, now you can either run away or grab a chair & a beer and watch it come - Phil