Heat the oven to 425 degrees F. Bake the sweet potato until tender, about 50 minutes, or bake in the microwave. When it is cool enough to handle, peel and smash it with a potato masher. Add the flour, egg, cinnamon, and nutmeg, and mix with your hands until well combined. Shape the dough into a ball, wrap it in waxed paper or plastic, and refrigerate for at least an hour and up to one day.
Fill a large saucepan or stockpot with water, and bring it to a boil.
When the water starts to boil, add the salt. Using 2 spoons, scoop up about 2 tablespoons of dough with one, and scrape it off with the other. Cooking no more than 5 to 8 gnocchi at a time, wait for them to rise to the surface, about 3 minutes. Let them cook 1 minute longer then scoop them out with a slotted spoon and transfer them to paper towels to drain. Repeat this process until all the gnocchi are cooked. Serve them right away.