Laughing at some replies here - 'talk to them and explain the situation' - yeah, that's going to work with a tired, distressed under 2.
What do you do? Quite frankly there's not much you can do if the circumstances align badly - so delays, having to travel because of ... (sibling family wedding)
There is a world of difference between a placid 3 year old and an under 2 that does not understand reasoning or threats in the future.
You contain as much as possible so within the space you have available (ie your seats, not anywhere else).
Sometimes a trip to the loos to run cold water on the hands and head of the purple screaming monster will give the cabin a brief respite from the hell that you have inflicted on them.
Drinks, food, technology - would just be a missile for a toddler in the throws of a full on 'I want to... get off the plane, sleep, run around, don't really know why ' tantrum. You sometimes have to wait until they exhaust themselves and hopefully sleep (no such luck for me)
My experience was that people that I thought had every right to be pretty pissed off were actually quite sympathetic - as long as they can see you are doing everything you can to silence the monster.
Our cabin crew actually suggested that the captain was quite concerned about the welfare of the child - were they actually very sick?? (Nope - they were just very very persistent). Their attempts to give them a teddy (thrown across cabin - both my hands were wrapped around said child at the time) - they suggested drugging them (had already done so) and eventually they moved us into their area at the back of the plane to limit the noise.
We did not fly again until they were in double digits. If I had known how badly it was going to go I would have apologised to my sibling and stayed at home.
They had been angelic on the flight in.