Preheat the oven to 375°F. Line a baking sheet with foil. Prick some holes in the sweet potatoes with a fork and place them on the baking sheet. Bake sweet potatoes until very soft, about 1 ½ hours.
While sweet potatoes are baking, in a food processor, combine the orange juice, coconut milk, vegan butter, cinnamon, nutmeg, salt, and pepper (I go heavy with the salt and pepper). Once the sweet potatoes are cooked and cool enough to handle, scoop out the flesh and add it to the food processor as well. Pulse the sweet potato mixture until totally smooth and evenly combined. Taste the mixture and adjust seasoning if necessary.
Make the crunchy rosemary walnuts (preferably while the sweet potatoes are baking to save time). Line a baking sheet with parchment paper. Spread the chopped walnuts out on the baking sheet and toast in the oven (still at 375°F) for about 8-10 minutes, or until fragrant and golden brown. While walnuts are toasting, in a small bowl, stir together the rosemary, avocado oil, maple syrup, salt, and pepper.
As soon as you remove the walnuts from the oven, pour the rosemary mixture over the top and carefully stir it in to combine with all of the chopped walnuts. Spread the rosemary walnuts out in a single layer and allow them to cool thoroughly.
Sauté the apples. Heat a large skillet over medium heat. Melt the vegan butter in the skillet and spread it around. Add the apples and maple syrup to the pan and stir. Cook the apples for 10 minutes, or until softened and lightly browned on the edges, stirring here and there. Set aside.
Assemble the vegan sweet potato casserole! Lightly grease an oven-safe dish (8x8 or 8x11 will both work) with vegan butter or avocado oil. Scrape all of the sweet potato mixture into the dish and spread it out evenly. Top the sweet potatoes with the sautéed apples in an even layer. Then, top the apples with the crunchy rosemary walnuts. Slide the casserole into the oven and bake until heated through, about 30 minutes. Enjoy the vegan sweet potato casserole hot!