My riad in the middle of Rabat's medina
There are a few things you can do:
1. Try to just walk to long main roads to go where you want, rather than taking 20 turns through the medina. Going out to a main long road will take longer, but it is easier.
2. Ask someone at the riad to walk you to where you want to go
3. Memorize landmarks such as the colours of each building or the doors or graffiti.
4. Take notes. Draw out your own map of the pathway when you leave your riad.
5. Take a card of your riad with you, so if you get lost, you can show people the address. If people have a cell, they can call. Sometimes if people help you, they will ask you to pay for their service. If some boys offer to help, ask them before they start walking with you if they expect to be paid. Some will accept 10dh or some will be silly and ask for 50. If they request too much, just say 'No thank you' and ask someone else. 10 to 20 dh is reasonable. The best people to ask are local workers at their shops. They are used to helping people and they don't ask for a fee. They can direct you but can't leave their shop to walk you there.
6. If you have a cell, take it with you to call the riad in case you get lost. Test call their number from the riad before you leave. Sometimes the number needs to be formatted in a particular way.