Hi
I really wouldn’t do this as ultrasonic cleaners are really good at putting holes in thin things
The speakers in your airpods have a thin plastic diaphragm that helps makes sound
When ultrasonic frequencies hit that chances are they will put holes in it,a way of demonstrating this is by putting a square piece of aluminium/tin foil in and watch what happens
What I would recommend is getting a small brick and a thing pick and cleaning them that way with isopropyl alcohol,that way is much much safer
Hopefully this helps
Any questions please ask
Thanks:-)