While there is no outright state or federal law that prohibits people from sleeping in their car, posted signs that prohibit overnight parking could get you an expensive violation. It really comes down to the municipality you are in, and if the area you are planning to park in allows long-term or overnight parking.