You could potentially use a longer-acting medication on a long flight, but he still advises against this. It is better to use something like a short-acting benzodiazepine like Xanax or Ativan, he said. These drugs are typically used for anxiety, but can also help with sleep.