You can not just walk ten feet or so into a forest and pitch a tent. You need a permit for that. BLM land is available for camping anywhere, but there are no facilities. The internet is most unreliable when it comes to information about BLM lands. The only reliable information I have ever been able to get is by going to the offices where you can find one, and speak with the personel.
Mostly you will need to stick to campgrounds. Fortunately these are clearly marked with a little tent symbol or a small green triangle on all good maps. Near the National Parks these are far and few between.
There are great Hostels in both Flagstaff (The San Francisco Hostel) and Moab (The Lazy Lizard). It is some years since I stayed at them. There is a State Park camp ground on the way to Canyonlands, and also one near Bryce (Kadakchrome SP). There are two hostels at which I have stayed near Yosemite - again at least a decade ago - Yosemite Bug and a private home hostel in Merced. There is a SP campground just north of West Yellowstone, on hwy US-191. I have stayed at all of these, and I suggest you allow $25 - $35 per night. For further info on hostels log into this site, the most upto-date and comprehensive hostel site on the internet.
24 hr. truck stops, which have all facilities, including showers. laundry and food, will generally allow you to sleep in your car overnight, if you ask for permission. Otherwise you might find yourself towed away as an abandoned vehicle. Problem is, that in the area you will be travelling there are very few truck stops, and none of those are near the National Parks.
Lifey