Getting decent images from the window of a commercial airliner is a real challenge. I have seen lots of advice that just says don’t do it. Typically I have my camera with me when flying but rarely do I find a scene that works as a photographic image. When you do come upon a suitable landscape, the window needs to be clean and the wing/engine needs to be out of the way. Make sure that you camera is not focusing on the window and do not brace yourself against anything in the aircraft. My landscape images are generally stabilized with a tripod or held against a solid object. An aircraft in motion is not a solid object, it is vibrating. Freely holding the camera and then using a short self timer tends to give good results.