Such these things have happened for real. A B767 ran out of fuel at 41,000 feet while over Canada, and a A330 ran out of fuel while at 39,000 over the Atlantic. Remarkably both aircraft were able to glide to safe(ish) landings. en.wikipedia.org/wiki/Gimli_G... en.wikipedia.org/wiki/Air_Tra...

Air Transat Flight 236 - Wikipediaen.wikipedia.org