While Xanax may be useful for flying on an airplane, it will not help you with your anxiety. It may help in the moment but you will not tackle your fear of flying if you are asleep the whole flight. If you ran out of your medication or left it at home, the anxiety will still exist if you go on an airplane again.