Medication is sometimes prescribed on a temporary basis to treat the symptoms of a flying phobia, such as anxiety and nausea. These drugs are usually taken shortly before a flight. They include: Anti-anxiety medication, such as diazepam (Valium) or alprazolam (Xanax).