That's the exact reason why we should have beds at work and not have regular working hours. People should just work and sleep whenever they want as long as they make meetings and project deadlines.
I for my part would never want to sleep at a bed in my office. I'd rather go home. I also live in Japan and a lot of places here have beds in the office but all it does is squeeze more time out of people and make them stay longer
I work from home coding, sometimes went onsite. If I'm stuck on a problem with some code which a walk or short break didn't solve, a sleep would usually solve it, hence the saying "sleep on it". I'd even sleep during the day for half an hour or a few hours just to get the answer. I've also been awake for 80hrs doing a windows server upgrade which failed horribly but I put that down to the system being hacked. Felt like a zombie, but strong tea and hard water calcium rich near London so possibly also contains unmetabolized cocaine in, played its part in being able to stay awake for that long.
That works for me. In the last months of collecting data for my PhD thesis, I pretty much lived in the lab. This was basically biochemistry, so there was lots of "do this, wait some hours, do that, wait some hours, ...".
So I just napped when I could. At night, on the couch in the break room. During the day, on the cot off the women's restroom. And conveniently, there was a shower for staff who cared for research animals.
Now, living in a small apartment, my ~12 m^2 room includes desk, bed and storage.