I think its all about attitude really, don't act like its your right to stay anywhere (even though it is!)
Never leave a mess outside, either why you are there or after you leave and just be respectful in general, never stay more than a night in one spot (unless you ask or have permission) and you wont get any problem.
I often stay in a layby just outside a place we are going to, then drive to the place in the morning, rather than turn up the night before.
And you always have a trump card of 'I was so tired it was dangerous to drive on', which for me is often true anyway.
But above all, don't be frightened to ask people if you can stay, I have stayed in supermarket car parks after filling up with fuel (Tesco's are particularly friendly) and even a subway sandwich shop car park simply because I asked if there was any chance because I was tired or visiting something local the next day.
You will be surprised how positive some people will be. Ok some may not but if don't ask, you don't know!
Unless your a hippy like Katmax!