I don't know!
I've tried myself to observe this phenomenon several times, but the subject has proven too elusive and wary. I'll lay out the dilemma - let me know if you get any ideas!
What's known for sure is this: every night, when I go to sleep, I am either wearing A) comfy sweats with underdrawers, B) my comfy soft breathable shorts with or without underdrawers, C) underdrawers, or D) none of the above. Every morning when I wake up, I walk straight to the sales support office and refill my big ol' cup of coffee (my attempts to dislodge more hot coffee by smacking the back of the upended cup into my FUCKING LIP are usually what awakens me in the morning) to find that I am in there, filling my coffee and fully dressed - usually in dark blue, green, charcoal or khaki khakis or else a smart pair of jeans (10 out of 12 it's jeans, to be more accurate), and with a sharp-ass laid-back combination of upper-body garments, which can include any sort of item like a blue, zipperfront pullover (for you Englanders or Commonwealthies, I understand this is what you might call a "wooly jumper") and a blue t-shirt underneath, a polo or other button-front short-sleeved shirt, a full long-sleeved collared button-down shirt of more-or-less classic make, but generally leaning more towards darkly bold or deep color for emphasis rather than any sort of jazzy or dressy cut, gloss, or accents. If a button-down shirt, I may or may not be wearing one of the coolest fucking ties you ever saw. If I'm wearing a sharp blazer, jacket of other kind, or the dark orange sweater, I may just opt for a TEE shirt as the foundational shirt - though you can better believe I'm looking fuckin' good by the time I notice.
But how did it happen? Again, investigations are ongoing. What's really needed here is a research assistant, someone who can be on-site to observe continuously, and make a detailed video record of everything that happens. Everything that happens to happen. The problem is - will the subject behave the same way with a research assistant there, in intimate proximity? The sleeping area is not very large. If the research assistant is a male, will the subject react as if in the presence of a competitor or an aggressor? Or - if the research assistant is a female, won't this too alter the natural behavior of the subject?
It's quite like the ol' uncertainty principle! Can't measure how the subject is putting his pants on, except by introducing a measuring element whose impact or influence may well prevent him taking them off in the first place - and/or present an obstacle to them ever being put back on. At least, not on anything like the timescale we've inferred from observations of the uninterfered-with subject.
I'm not sure what the next step can be, realistically.
I'm going to go get some more coffee.