The first few times were by accident, but once I realized they are durable enough I started wearing them sometimes while showering if I've got a good audiobook or YT video that I don't want to put down.
I think they're supposed to withstand some degree of moisture, but I don't believe they're designed specifically to be submerged. However, one of mine (gen 2 airpods) got fully submerged for maybe 3 seconds in the bathtub but it managed to start working again when I let it dry out.
I'm not saying I recommend others treat their AirPods as if they're water resistant but, in my experience, all the generations of AirPods can take a bit of a water beating. The only ones I've never done this with are any of the Pro models.