Yip, just to repeat most of the above - been here 5 months so far and camped out a lot - no problems, quite a few goat herders turn up in the morning to say Hi, always friendly if slightly miffed as to what you are doing (Im a late sleeper which is why I think). Usually ask for food or clothes. Or if you have seen their camels.
So that is on the pistes and desert areas.
Near or in large cities (casa, fez, marra etc) you really need to use a campsite, though I often sleep in petrol station carparks, the big ones with restaurants attached open 24/7, buying something from the shop and having an exchange of greetings with the pump attendents helps.