The World Federation One Stop Fiqh

Ruling 605

If someone dies on a ship, in the event that his corpse will not decompose and there is no problem with it being on the ship, the people must wait until the ship reaches land and then they must bury it in the ground; otherwise, the ghusl, camphorating, and shrouding must be performed on the corpse while it is on the ship. And after performing ṣalāt al‐mayyit, the corpse must be placed in a large barrel, its lid closed, and then the barrel must be thrown into the sea; or, a heavy object must be tied to the feet of the corpse and then it must be thrown into the sea. If possible, the corpse must be thrown in a place where it will not immediately become food for animals.