Performing your prayers (salah/namaz) while on an Airplane is not that easy as most Airlines do not provide such facilities.
If you are flying first or business class, finding a place to spread your prayer mat and pray properly is not generally an issue. However if you are flying economy class, due to space constraints, it a bit more challenging. In this case, the best is to approach the airline staff and see if they are able to provide some space. If that is not possible, then one can perform salah while seated. Consult your scholar to know the exact ruling regarding the performance of salah while seated in a plane.