Accommodation is accessible in all price levels, with the highest-end hotels available exclusively in Nouakchott and Atar. In the Adrar and Nouadhibou, “Auberges” and Campsites rent beds/mattresses for as low as 1500 ouguiya.
In the remainder of the nation, there is typically at least one hotel in the provincial capitals, but they may be pricey for what you receive. Make friends with a local and ask to stay with their family if at all feasible. You’ll probably have a nice and memorable stay if you don’t mind sleeping on a foam pad on the ground, sleeping/eating among animals, or using a toilet.