Finding accomodation is usually easy if you don't mind spending a lot of money. But most hitchhikers don't have a lot of money, so then there are several other options:
You can bring your tent and sleeping bag and you'll basically be free to sleep anywhere. Beware that in most countries it's not legal to put up your tent anywhere. It is generally legal in Scandinavia, Finland, Scotland and Ireland, though. Legal or not, camping wild needs not to disturb other people. Putting up your tent in a discrete place at or after dawn, breaking up before people will notice and not letting garbage or fire places behind there are general recommendations to stay overnight in situations where camping wild is not officially allowed.
Alternatively, go to a house with a garden and ask if you can camp there.
Quite often there are attractive spots for camping wild near motorway petrol stations. If the noise is disturbing you can take ear plugs along. Even in highly urbanised countries like the Netherlands camping wild is still possible; for example if you hitchhike out of Amsterdam in the evening you can go just to service area Haarrijn, situated along the A2 motorway between Amsterdam and Utrecht. The area is vast and putting up a tent at dawn at the other end of the area will not draw attention, while the spot is scenic (and very "Dutch" with fields, cows and water around).
DigiHitch has an article on sleeping near the highway (not necessarily with a tent).
It can happen that your driver offers you a place at his or her house to put up your tent. It can also happen that you get a place offered inside.
Hospitality exchange networks
Hospitality exchange networks require a bit more planning, but are very valuable tools for traveling. Sometimes there are meetings and gatherings of tens, or even hundreds of hospitality exchange members. If you go there you'll surely get a place to sleep!
- CouchSurfing (CS), 100000+ members, managed in a collective way, slightly North American-centric but growing rapidly.
- Hospitality Club (HC), 220000+ members, managed in a dictatorial way, slightly Euro-centric because it was started there.
- Global Freeloaders doesn't have a fancy website, but it's easy to send out a lot of messages at once, and members contact you directly over email, which makes it a lot faster to use, probably convenient for finding last-minute places. Though the lack of handy profiles and the direct communication over email definitely make this site less secure.
See also Current hitchhiking events for times and places where you can find free or very cheap acccomodation and friendly people.