Yes......both the lonely planet and rough guides to the areas have lots of places listed.
There's no shortage of places though...and take those books only as guides...they're actually hopelessly out of date in both what's available and in prices.
Any town will have somewhere, and usually lots of places to stay in fact......and you'll find lots of bikes and cars going through the Western Sahara route who will point you in the right direction too....
You will also be flagged down and accosted by young blokes on the edge of every town who will offer to show you 'their' hotel, or 'their brother's hotel'
Obviously these guys are there to make some money, and they'll take you to the place they know they'll get kickbacks......don't automatically say no though, as they can be very useful and if one place is full, will find another...the owners just give them their 10% and they're happy, plus they'll be after a tip from you too.