The rule is that you are supposed to sleep only in guesthouses registered to accept foreigners and they are not everywhere. Camping is not authorized, nor sleeping in someones house (and your host might get into trouble for taking you in).
To get help to find guesthouses where you can stay:
– ask the police, they are very helpful
– at many places you will see blue signs ‘warmly welcome and take care tourists’ with a hot line number. Call the hot line and they will be able to point out where to sleep.
We travelled in Jan 2012 and we paid between 20$ and 35$ per night in tourist places. We could probably have go cheaper if we wanted to. Places were all clean and globally it was mainly good value rooms. Outside of tourist area we paid up to 45$ and the quality was going down but it was still OK.
Should you want to go somewhere where there is no guesthouse, you can always go see the police and ask for a special authorization to stay there for the night. They might authorize you to stay in a guesthouse normally not registered for foreigners or in a nearby monastery. I haven’t tried it myself but I got report of cyclist who did with success.
About camping, this is technically forbidden. That said, at many places on the road, it would be easy to find a spot out of sight to put a tent. Even if you are supposed to register at a guesthouse every night, it won’t matter if you skip a few nights (it happened a few times for us where one of the two arrived later at the hotel and didn’t fill the registration form). However, I would use the camping as a backup plan and not as a general solution. I heard a story of a guy who camp out every night and ended up being accused of being a journalist and got a bit of trouble (this was a few years back when the country was much less open).