People die everywhere, all the time. It should be no surprise that cruise ship operators must sometimes deal with deaths at sea. Apparently an average of 200 people die on cruise ships every year. Where do they put the bodies? As Snopes points out, "Older people spending longer periods of time on cruises means an increased likelihood that some will die of natural causes during their trips." Snopes quotes from a 2015 article in The Telegraph:
Ocean-going ships are legally required to have both body bags and a morgue (they mostly have space for three or four bodies, but it depends on the size of the ship). The latter must be kept away from the food storage areas. Very occasionally, the morgue might not be big enough – a Columbia News Service report from 2007 quotes Ross A. Klein, a sociologist from Toronto and author of "Cruise Ship Blues: The Underside of the Cruise Ship Industry." On one cruise from Fort Lauderdale to Lisbon "the morgue was filled, and they had to start finding other places to put the bodies," he said.
According to one cruise line, some ports insist bodies are off-loaded as soon as possible – this is done discreetly using an exit away from the passenger gangway. A death certificate is then issued and the body repatriated to its home country[…]
Other ports allow the body to stay on board and return home, which saves a lot of paperwork. It also means the spouse can continue their holiday. And yes, that does happen, according to one cruise line insider.