Texan - Since you asked I'll provide some of the laws that do apply in California. I can't speak to every state but I would imagine most have a similar way of handling their rest areas. Technically you are correct, California does not prohibit overnight parking. They do have a limit on the time. Whether or not an officer chooses to enforce it will vary. Much of that may well be determined by the attitude of the offender. Now in my experience as long you are conducting yourself in a civilized manner and not flagrantly camping then they don't tend to bother you. Actually from the sounds of it California's 8 hour limit is pretty reasonable. I personally have slept in rest areas both in my car and in my trailer without a problem. I have even been in a couple that had enough open space to partially extend my slide and not cause an issue.
This is taken from the California DOT website covering
Rest Area Usage PolicyRest Area Usage Policy
The Department of Transportation's Rest Areas are a stopping place for your relaxation. Please help us keep them pleasant by using them as they are intended and by being considerate of others.
Remember, by staying too long, you will be in the way of someone else who needs to stop. Thank you for your cooperation.
You May:
Park in any designatd parking place
Stay up to 8 hours in any 24 hour period.
Walk your pet, as long as it is on a leash.
Place your litter only in trash receptacles.
Dump sanitary wastes from RV holding tanks and portable devices at designated dump stations.
Use small stoves and heaters (except on wood tables) if you do it safely.
Engage in some nonprofit activities, with The Department of Transportation's permission. (The Department's permission does not indicate sponsorship).
You May Not:
Block vehicular or pedestrian traffic.
Camp or pitch a tent.
Park, to do something away from the rest area such as hike, camp or hunt.
Use a megaphone, loudspeaker or other sound amplifying device.
Use The Department of Transportation's water, electricity or gas for unauthorized use.
Sell or publicize your private goods or services.
Put anything on walls or plants.
Violators of these rules will be cited by a California Peace Officer.Some of the exerpts from the California Streets and Highway Codes that would apply (these do carry the color of law):
225. (a) The department may enact rules and regulations governing
the time and manner of use of safety roadside rests, and all state
laws and rules and regulations of the department shall be
administered and enforced within the safety roadside rests by all
employees of the state authorized by the department to do so and by
all peace officers.
(b) No person shall engage in any activity within a safety
roadside rest area or vista point prohibited by rules and regulations
adopted pursuant to this section.
(c) A violation of subdivision (b) is an infraction. A second or
subsequent conviction of a violation of subdivision (b) is a
misdemeanor.
This one opens up a whole bunch of ways for a Law Enforcement Officer to cite if they so desire:
226. Areas comprising such safety roadside rests shall be deemed a
part of the state highway right-of-way for all purposes, including
those set forth in Section 731.