Heather drove me to the endoscopy centre, where the AirPod was got back out via my mouth using a tube with a lasso attachment. It was extremely uncomfortable, but I was sedated and so only half awake. A few minutes later, I was given the AirPod in a neat little bag.
I tried it as soon as I got home. It works fine, although the microphone is less reliable than it was. I’ll never know for certain how I managed to swallow it; my theory is that it dropped on to the pillow, ended up next to my mouth and got sucked in when I yawned. In retrospect, I’m glad the “find my AirPod” attempt didn’t work — I would have freaked out if my throat had beeped.