It is not permissible to bury a dead person in the sea unless people fear that his corpse will get rotten. If so, it is permissible for them to wash his body and offer funeral prayer for the deceased, and put up something heavy with the corpse so that it will plunge into the seabed. If there is some water in the grave, it should be dried up or the deceased should be enshrouded in a water-proof cloth; however, it is preferable not to bury the deceased in such places which can be figured out by experience.
Sheikh Ahmad Ash-Sharabasi, a professor at Al-Azhar University, states the following:
“Muslim jurists have mentioned that if the a person has died on a ship in the middle of the sea, those accompanying him shall decide on the matter. If they expect that they will reach the beach within one or two days where they can find an appropriate place to bury him, then they have to wait until they reach that place provided that they do not fear the corpse will be rotten or disfigured.
However, if they do not expect that, or fear that the corpse will become decayed, then they should wash and shroud him after applying perfume to his body. Afterwards, they should pray for him, fasten something heavy to his body, and then throw him into water. Some view that the corpse should be enclosed in something and thrown into water so that it will sink due to the heavy thing fastened thereto. In this way, the sanctity of his corpse will be kept intact.
There are some scholars who have said that the corpse should be fastened to two pieces of wood and thrown into the water so that it will be driven into the beach. However, this method is not safe, since it does not preserve the corpse which remains buoyant and is subject to get rotten in several ways. Moreover, it may reach the beach after having been disintegrated, his private parts may be exposed, or some polytheists may find his corpse and not preserve its sanctity.
The significance of burying the deceased lies in covering the corpse, preventing the spread of its stench, and protecting it from predatory birds or animals that may feed on it. It is Sunnah to dig the grave in a way that fits a man of average height. If there are some water in the bed of the grave, it is preferable to dry it up even by filling it up with sand, pebbles, and the like, or to put a piece of cloth under the deceased if it helps protect him from water. Some jurists made it permissible to put the deceased in a coffin if the piece of land were flabby, moist, or there is water in its bottom and cannot be dried up.
It is, in effect, preferable to choose Muslims’ graves distant from the moist places which can be figured out by experience and the help of experts.”