I've done a lot of dumb stuff in my life (correspondence closed), but I've never managed to get arrested for exposing my backside at a temple.
American bloggers and — ahem — influencers Joseph and Travis Dasilva recently posted online a series of half-naked photos from their visit to the Wat Arun temple in Bangkok. They've been posting butt-related photos from around the world on their "Traveling Butts" Instagram account for ages. The pair set up the camera for an automatic selfie, turn as if looking at the scenery and lower the pants for photo.
Thai authorities arrested them, fined them then set them free.
When in Rome — or Thailand; or anywhere for that matter — keep your pants on in public unless the locals are doing it, too.