As I’ve got older, the more I’ve moved towards air mats, both for improved comfort, and because I can fit the mat into a much smaller space in my pack (both good for climbing and travel). For the last two years, I’ve been using a @Thermarest Neoair Xlite, and I’ve done over 400 nights on it, including seven big walls, seven weeks on Denali in February, travelling around Africa, and hundreds of nights of camping.
When using the mat in hostile places I was always hyper-vigilant to anything which could puncture it, with thorns under your tent being the number one culprit, and so always used some kind of tent underlays (old tarp, foam etc), and a bivy bag if outside.
But you will always get punctures, generally, the slow kind, which means you wake up on a flat mat.
Having a puncture repair kit is vital, the current Thermarest kit working much better than the older versions, and you should always carry one in your first aid kit. An alternative is to just carry a 7g tube of Seam Grip and repair the hole using a combination of glue and a patch of non-permeable material (gaffer tape/offcut of material from a stuff sack/piece of plastic packaging). But what if you’ve got no patches and no glue?
You should always carry some gaffer tape (wrapped around a pencil in your first aid kit), and you can use this for a makeshift repair job. To get it to really stick you need to heat it up first via a stove (you might need tweezers to hold it). First heat up a small square and stick that over the hole, then a larger square and cover everything with the second layer.
This repair might not last forever, or even require you to wake up in the night to blow up your mat, but it should see you home.