Praise be to Allaah.
You have to face the direction of the Qiblah when you are praying an obligatory prayer, because Allaah says (interpretation of the meaning):
“so turn your face in the direction of Al-Masjid Al-Haraam (at Makkah). And wheresoever you people are, turn your faces (in prayer) in that direction” [al-Baqarah 2:144].
You could ask the crew to find out which direction the Qiblah is in, and make the most of the opportunity, once the plane has reached its altitude and settled in its course, to pray standing facing the Qiblah. If that is not possible, and you can delay the prayer until the plane lands, without delaying it beyond the allotted time, so that you can pray standing and facing the Qiblah on the ground, then you can do that. If this is not possible because you fear that the time for that prayer will end, then pray as best you can in the plane, and your prayer will be valid. Allaah does not burden any soul with more than it is able to bear. And Allaah is the Source of strength.
Sheikh Muhammed Salih Al-Munajjid