Heat oven to 200C/180C fan/gas 6. Peel the sweet potatoes and cut into small bite-sized chunks. Toss in a 20cm gratin dish with the olive oil, cayenne and some seasoning. Roast for 25-30 mins, or until golden and soft, tossing occasionally.
Meanwhile, melt the butter in a saucepan and add the flour. Stir together to make a roux, and cook for a couple of mins. Remove from the heat, then slowly pour in the milk a little at a time, stirring well after each addition. Put the pan back on the heat and bring to the boil, stirring all the time. Turn the heat down, add the mustard and nutmeg, and season well. Add in most of the cheese (keep some for the top) and continue to stir. Taste for seasoning. Keep on a low heat so it stays warm until the macaroni is ready.
Cook the macaroni in boiling, lightly salted water for a couple of minutes less than it says on the packet. Drain (reserve some of the pasta cooking water), then stir the pasta and cooked sweet potato into the cheese sauce. The mixture should be quite thick, but add a little of the pasta cooking water to loosen if necessary. Taste for seasoning.
Tip the mixture into the gratin dish, then scatter over the rest of the cheese and return to the oven. Bake for about 20-30 mins, or until the top is golden brown and bubbling.