most cops or security guards will do is to tell you to move on, or harass you. my dad lived out of his car in LA for a while, and he said that you need to pick the areas in which you stay carefully - camping in the parking spot of Ralphs in Encino? Not a good idea, too many rich people around, means the cops are diligent.
Camping out in Walmart or in the back of strip mall carparks - not such a big deal.
WORD OF WARNING - you are to an extent at the mercy of whichever asshole in a uniform shows up - DO NOT HAVE DRUGS IN YOUR POSESSION. THis can make a "lets roust this johnny-live-frugal out of the neighbourhood" to "cuff him and book him".
My advice if travelling cross country - great to have a sleeper, but also buy a propane stove, some good camping gear, some fold up camp chairs and half a pound of sticky and make the most of the incredible national and state parks. There are many, and they are cheap.