Staying in a riad (traditional house built around a courtyard) within the medina is the defining Moroccan accommodation experience. Marrakech has hundreds ranging from budget ($25-40/night) to luxury ($300+). Fez's medina riads are generally smaller and more authentic. Book well ahead — the best fill up months in advance.
Agadir and Essaouira offer beach town alternatives with more relaxed atmospheres. Desert camps near Merzouga range from basic Berber tents ($40/person including dinner) to luxury glamping ($200+). Chefchaouen's small guesthouses in the blue medina are affordable and charming.