When it is time for
a Salah on a plane or a ship, it is obligatory on the Muslims on board to perform the Salah according to their conditions and abilities. If water is available, it must be used to perform the ritual purification, but if there is none available or it is available but they are unable to use it, they may perform Tayammum if they can find earth and something similar. If they cannot find any water, earth, or anything that can take the place of earth, the obligation is removed and they may perform Salah as they are. Allah (Exalted be He) says:
So keep your duty to Allâh and fear Him as much as you can
They should face the Qiblah and turn with the plane wherever it goes during the obligatory Salah, as much as they can. As for the Nafilah (supererogatory) Salahs, they can be performed in the direction that the plane is traveling, because the Prophet (peace be upon him) used to offer Nafilah Salah on his camel wherever it was facing. It is authenticity reported on the authority of
Anas that it is permissible to face the Qiblah at the beginning of a Salah when offering a Nafilah Salah on a journey. (Part No. 8; Page No. 122) May Allah grant us success. May peace and blessings be upon our Prophet Muhammad, his family, and Companions.