Preheat the oven to 325°F (160°C). Lightly grease an 8x8-inch (20x20 cm) square baking pan and set aside.
In a medium bowl, combine the graham cracker crumbs, granulated sugar, cinnamon, and melted butter. Stir until the mixture resembles damp sand. Firmly press the mixture into the base of the prepared pan to create an even crust layer.
Transfer the pan to the oven and bake for 8 minutes. Remove and set aside to cool slightly while preparing the filling.
In a large mixing bowl, beat the cream cheese until completely smooth and lump-free.
Incorporate the mashed sweet potato and sugar, blending until the mixture becomes creamy and homogeneous.
Add the eggs one by one, ensuring each is fully integrated before adding the next. Stir in the vanilla extract, cinnamon, nutmeg, and salt, mixing just until combined.
Pour the sweet potato cheesecake mixture over the pre-baked crust, smoothing the top with a spatula for an even layer.
Bake in the preheated oven for 40 to 45 minutes, or until the center is set with a slight jiggle when gently shaken.
Once baked, switch off the oven, crack the door open slightly, and allow the cheesecake to rest inside for 15 minutes to minimize cracking.
Remove the pan from the oven and let the bars cool entirely at room temperature. Once cooled, cover and refrigerate for a minimum of 4 hours, preferably overnight, to ensure the filling sets completely.
If using the optional topping, whisk together sour cream, powdered sugar, and vanilla extract in a small bowl until smooth. Spread this mixture evenly over the chilled cheesecake layer.
For added garnish, top each bar with a dollop of whipped cream or a sprinkle of chopped pecans before serving.
Cut into squares using a sharp knife, wiping clean between cuts for neat slices. Serve chilled.