One thing we do is use Hilton Honors points and we plan our drive time to coincide with a nice stopping point in a town where the same Hampton Inn is lower tier than closer to town. And then it doesn't cost us anything.
Beyond that--I have a budget...and I start googling around for cities and then surrounding cities...because sometimes, the outskirts or just beyond is a wee bit cheaper than in town.
Same day booking is tough--but we just usually always stay in a Hampton Inn and shoot for $100 or less.
And since we like to know when the road trip is going to end...we do book ahead. But sometimes, due to changes in plans--like when I don't plan on stopping and was traveling by myself and was ready to throw in the towel, I call my husband and he goes on the big computer and searches around for me. I sit in a nice safe parking lot and he just finds hotels around me that have last minute booking deals available. And if they don't--he finds the cheapest one that meets my criteria: decent hotel with interior corridors. So if you have a computer with you--or a decent smart phone, you can do that when you start itching to stop. We usually stick with hotel websites. You can book for less on other websites, but I don't really know who all has the best deals.