Preheat oven to 400°F (200°C). Prick sweet potatoes with a fork and roast for 45 to 60 minutes until soft.
Remove skins from potatoes while warm and pass the flesh through a ricer into a large bowl. Allow to cool completely.
Add drained ricotta, Parmesan, egg, salt, and nutmeg to the sweet potato mash; stir until evenly incorporated.
Gradually fold in flour 1/2 cup at a time, mixing until a soft, slightly sticky dough forms. Avoid over-kneading to prevent toughness.
Turn dough onto a well-floured surface and divide into 8 manageable sections.
Roll each section into a rope approximately 1/2-inch thick.
Cut ropes into 3/4-inch pieces using a bench scraper or knife. Optionally, roll pieces over a gnocchi board or the back of a fork to create ridges.
Bring a large pot of salted water to a rolling boil.
Drop gnocchi into the water in batches. Cook until they float to the surface, approximately 2 to 3 minutes.
Remove cooked gnocchi with a slotted spoon and transfer directly to a pan with warm sauce or a lightly oiled tray.