Many cities in the bay area have laws or regulations prohibiting this. I understand the sentiment, but he needs to be aware that an officer of the law may be knocking on his window in the middle of the night or placing a ticket on his window while he sleeps.
Some cities allow overnight parking, but only with a permit which only residents can get (and it isn't cheap).
Obviously all of these restrictions only apply to public property (streets, parks, etc.).