Earlier quoted context omitted.
One day I could not compile something. After fighting it several hours I decided to go sleep. A few minutes before waking up I dreamed that the solution was to set an environment variable. I even saw the specific variable and which value I had to set. I woke up and immediately tried it. It worked.
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.
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.