How Should I React When Caught Sleeping Nude?

TLDR
I've seen enough "oh no, they saw everything" panics to know this one: being naked in your own bed is not a scandal, it's Tuesday. The awkwardness is real, but the verdict on who owes whom an apology depends entirely on how the door got opened.
What actually happened when you got caught sleeping nude?
The post I'm working from is basically a shrug - "what happened?" - with zero details about who walked in or why. So instead of inventing a story, let me give you the honest trichotomy, because "caught" almost always means one of three things.
First, an accident. A roommate needed something, a kid wandered in, a partner came to bed late. Nobody did anything wrong. Being nude in your own bed is legal and completely normal; the blindspot is that "caught" language makes you feel guilty when you're not.
Second, a boundary slip. Someone entered without knocking when the norm in your house is knock-first. Here the conversation isn't about your body - it's about their door behavior. This is where a calm "hey, knock next time, yeah?" matters more than any apology from you.
Third, the uncomfortable one: intentional entry into a private space, or someone lingering, photographing, or making it weird. That's not an awkward moment, that's a violation - and depending on where you live, potentially something to report or at least take seriously with the people you live with.
Should you apologize, explain, or just get dressed?
Get dressed, mostly. The single best in-the-moment move is low drama: pull the sheet up, say "oops, one sec," and let the person leave or turn around. Over-apologizing signals something shameful happened and invites gossip and prolonged awkwardness. One thrown-together excuse does the same.
The follow-up depends on who it was. With a partner, it's usually a joke by breakfast. With a roommate or family member, a light, short comment works better than silence if either of you seems off: "Hey, about last night - my bad if that was weird, maybe let's do knock-first." That should take about forty-five seconds. With a stranger, landlord, or anyone you don't share bathroom-toothbrush proximity with, keep it brief, formal, and done.
The fishhook in most of these situations is replaying it for days while the other person forgot by lunch. If it keeps nagging, one honest conversation beats a week of avoiding the kitchen.
How do you stop it happening again?
Cover the practical layer: a working lock doesn't make you paranoid, it makes you a housemate with boundaries. If you share space, settle the norms once - knock and wait, no entering bedrooms uninvited - and the whole category of problem mostly evaporates. Whether you sleep clothed or not remains entirely your call; you shouldn't have to change your sleepwear because someone else doesn't know how doors work.
What I'd flag: if the person who walked in seems to have done it on purpose, or the dynamic involves a minor or coercion, that leaves the realm of housemate etiquette. Talk to someone outside the situation - a counselor, a landlord, or where appropriate, the police.
So the next time someone wants to know "what happened?" about your naked sleeping incident - what's your version? An accident at 2am, a knock-first conversation you need to have, or something worse that deserves a bigger response than embarrassment?