For long flights I like to book late-night flights because I want my kid to sleep through most of the flight.
But what actually happens is that she gets overexcited and stimulated by all the new things she’s seeing, and becomes overtired and resistant to falling asleep. Sleep does eventually come for her, but usually after a lengthy, squirmy struggle.
This is one of those plan-for-the-worst-and-hope-for-the-best things. YMMV.