Tourists can travel freely in most Moroccan-controlled parts of what are called the Saharan Provinces (an administrative area created to include the former Spanish Sahara, while not coinciding with its boundaries), but do check first on the political situation. 2010 and 2011 saw violent clashes between Saharawis and Moroccan settlers and police in Laayoune, Smara and Dakhla, among other places, and you should be aware that protests often involve violence, and should be avoided. Government advisories will have up-to-date information if any problems have arisen. Apart from this, the only obstacle would be for visitors who admit to being a writer or journalist: a profession not welcome in the region, unless under the aegis of an official press tour.
Otherwise, visiting Laayoune, Smara, Boujdour and Dakhla is now pretty routine, though it does involve answering a series of questions (name, age, profession, parents’ names, passport number and date of issue etc) at numerous police checkpoints along the way. This is all usually very amicable, but time-consuming (you’ll be asked for these details four times, for example, between Laayoune and Dakhla). To save time it is a good idea to print out and/or photocopy several copies of a sheet with the following information listed, preferably in French (as given here in brackets): family name (nom), given names (prénoms), date of birth (date de naissance), place of birth (lieu de naissance), marital status (situation familiale), father’s name (nom de père), mother’s name (nom de mère), nationality (nationalité), occupation (profession), address (addresse – which should be given in full), passport number (numéro de passeport), date of issue (date de déliverance), place of issue (lieu de déliverance), expiry date (date d’expiration), purpose of visit (motif du voyage – tourisme, for example), make of vehicle (marque du véhicule – you may of course have to leave this one blank), vehicle registration number (matriculation – ditto), date of entry into Morocco (date d’entrée en Maroc), place of entry (ville d’entrée) and police number (numéro de police – this is the number stamped in your passport alongside your first entry stamp into Morocco, typically six digits and two letters). For marital status, you could be single (célibataire), married (marié if male, mariée if female), divorced (divorcé/divorcée) or widowed (veuf/veuve). Armed with this, you can then give your details to police at every checkpoint, which will save them having to ask you for the information point by point.
Petrol and diesel are subsidized in the Saharan provinces (basically the Western Sahara), and cost about a third less than in Morocco proper.