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.
Alternatively, go to a house with a garden and ask if you can camp there.
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.