Xanax can be prescribed for short-time anxiety issues. Like some people have anxiety issues in flight. So in this case, the doctor can prescribe anti-anxiety medications like Xanax. You may also need to show your flight ticket as a prove. Take the anti-anxiety pill just before taking off the flight.