Preheat the oven to 200C/400F. To make the potato gratin, Layer the potatoes, and thyme leaves in a large roasting tin large enough to sit neatly underneath the leg of lamb. Season each layer as you go with a pinch of salt and plenty of pepper and finish with an attractive overlapping layer of the potatoes. Pour over the stock and set to one side.
Using a sharp knife, make small incisions all over the lamb and press a tiny sprig of the rosemary well into each one. Weigh the joint and allow 20 minutes per 450g plus 20 minutes (add a further 20 minutes for well done) then place the lamb carefully on top of the potatoes in the roasting tin. Roast for 20 minutes and reduce the oven temperature to 180C/350F and roast for 1 hour and 40 minutes for a leg of lamb this size.
Transfer the leg of lamb to a carving platter and cover loosely with foil, then leave to rest for 15 minutes, keeping the potato gratin warm.
To prepare the spinach, heat a pan over a medium heat and add the butter. Once it has stopped foaming, quickly sauté the spinach with the nutmeg, if using until soft and wilted. Season with a pinch of salt and plenty of pepper and then drain briefly in a sieve or on kitchen paper to remove the excess moisture. Return to the pan and keep warm.
To serve, carve the lamb into slices and arrange on warmed serving plates with the with the potato gratin and wilted spinach.