Thoroughly wash the sweet potatoes under running water using a sponge.
Place the sweet potatoes in a pot, add a pinch of salt, and cover them with water.
Bring the water to a boil, then cook over medium heat until the sweet potatoes are tender but not overly soft (30–40 minutes). Remove the sweet potatoes from the water and let them cool slightly.
Meanwhile, dice the ham and mozzarella into small cubes. In a small bowl, beat the egg.
Once the sweet potatoes are cool enough to handle, slice each one in half lengthwise. Use a spoon to scoop out the flesh, leaving about a 5 mm (1/4 inch) thick border around the edges.
Preheat the oven to 200°C/400°F (180°C/350°F fan-assisted).
In a large bowl, mash the sweet potato flesh. Mix in the ham, mozzarella, egg, a pinch of salt, and black pepper. Stir until well combined.
Fill the sweet potato halves with the prepared mixture and sprinkle grated aged cheese on top.
Bake in the preheated oven for 20 minutes. Switch to the grill setting and bake for a few more minutes, or until the cheese is golden and bubbly.