Depends entirely on where exactly you are. The only place you can be certain you're allowed to camp is official camping grounds (Campingplätze / Zeltplätze). Everywhere else MAY tolerate you for a night (unless you behave like idiots, of course) or they might chase you off or even, if you're unlucky, fine you.
(Disclaimer: not legal advice in any way, just based on general experience from living here and ViBeS) I would assume that sleeping in your car would be the safest route if you're determined to avoid fees. People are less likely to assume you're setting up permanently but will be more willing to believe that you're just passing through and couldn't find a place for the night or whatever.