Why? Ambien lasts no more than 8 hours. A red-eye flight is normally 6 to 8 hours. What's the problem?
It is actually one of the strengths of Ambien that it has few aftereffects when properly used. You take it, fall asleep, and wake up 8 hours later feeling refreshed and with no wooziness. That's been precisely my experience. That's why it's so widely used.
I have to say that it's a little tiresome getting medical advice and handwringing on FR. Doctors prescribe Ambien, and properly used it isn't and shouldn't be a problem for most people. Of course it won't work for some people, and shouldn;t be abused. Sort of like pencillin or Tylenol.
So I see, you are the resident Ambien expert!