The ones from the Dollar Store work also.
There's usually a self-pay bin at the gate.
If you wait to buy them on the plane, you will have to (a) wait until the flight attendants have taken care of more urgent issues when the flight takes off, and (b) pay with a credit card because the flight attendants don't take cash.