How to Make It
Preheat oven to 425°F. Place potatoes on a rimmed baking sheet and poke holes with a fork. Rub with 1 tablespoon oil.
Cut off ¼ inch from top of garlic head to expose cloves; place on a large piece of foil. Drizzle garlic with 1 tablespoon oil; season with a pinch each salt and pepper. Wrap in foil and place on baking sheet with potatoes. Bake until potatoes are tender when squeezed, 40 to 45 minutes.
Cut potatoes lengthwise; scoop flesh into a bowl. Unwrap garlic and squeeze cloves into bowl. Mash potatoes and garlic together and set aside.
Line a plate with paper towels. Heat remaining 2 tablespoons oil in a small skillet over medium-high. Add rosemary and fry until crispy, about 10 seconds. Using a slotted spoon, transfer rosemary to plate, reserving oil in skillet. Season rosemary with a pinch of salt.
Bring 6½ cups water and 1 teaspoon salt to a boil in a large saucepan over medium-high. Gradually whisk in polenta; reduce heat to medium-low and cook, stirring constantly, until polenta is tender and mixture thickens, about 5 minutes. Fold in sweet potato mixture, reserved oil, remaining 1 teaspoon salt, and several grinds black pepper. Top with fried rosemary.