You usually can't live in a commercial property.
I do, have been for 6 years. Officially homeless. No issues whatsoever. I need a "lab", and I need to live; and it's easier to do the lab / business thing in a commercial/industrial setting. This way, I get rid of half of the expenses. Here, we don't have any specific law that
actually forbids it, it's just something people seem to assume and fear of doing. A key to avoid unwanted discussions or actions is to actually have commercial things going on (like me, or Fran, do). No law prevents you from working all night at your workplace. No law prevents you from having a sofa or bed at your workplace, or adding a shower. No law prevents you from taking a short nap while working. Quite the opposite, if a trendy Silicon Valley company implemented this, there would be articles of how well they take care of their workers.
Finally, no law prevents you from giving your "workplace" address to everyone, including authorities, so you get all the official mail. Homeless people (including those who
really live on the streets) need to have an address as well, it's a normal procedure to come up with something.
It's just that
if it becomes obvious that you are misusing a commercial property to live in, and
not using it for the intended purpose, someone may get upset, and depending on legislation and actual contracts, may have leverage for actions. This is easily avoided by using it for the intended purpose and keeping low profile about the fact that your "naps" are 8 hours, not 30 minutes. This is easy, because it's your private area.
No one, including my landlord (I'm renting) or fire inspectors, have never had anything to say about this. They can clearly see I "quite" live here, but they clearly don't see it as an apartment, because the business + hobby is predominant.
And as a plus, I can drive a car in my living room.