If a person dies on a ship while traveling at sea, according to Imam Ahmad, the people should wait if
they hope to reach some place to bury him (such as an island or beach) in a day or two and if they
are confident that the body will not decay. However, if they cannot, they should wash the body,
shroud and protect it, then pray the funeral prayer, and finally, tie something heavy to it and drop it in
water. (Al-Mughni, 2/381)
From the book What Should You Do in the Following Situations... ?