I'm at the coast of Morocco at the moment, going back to Marrakesh in a couple of days. It's truly an amazing city! I would recommend wearing clothing and footwear that you don't mind getting dirty, and pack a sweater or jacket for the evenings. For example, I'm wearing a linen shirt, navy chinos and loafers at the moment.
Do try the food stalls on the central square, and make a reservation at GastroMK in advance if you're looking for something nicer!
Thanks for the advice. As I'll be in London for four days prior to Morocco, I will be packing weather-appropriate clothes for that location as well, so jacket/sweater will be no problem. I will assume that dust is a major factor of life in a desert country, and I'm familiar from the American West and Southwest that dry climates cool off a lot more than humid ones once the sun goes down.
As it is, I'll be staying in the Palmeraie, outside of the medina, but with access to easy transport into/out of the city center.