Preheat an oven to 450 degrees F (230 degrees C). Scrub and dry the sweet potatoes, then prick several times with a fork and place onto a baking sheet. Bake in the preheated oven until the sweet potatoes are easily pierced with a fork, 50 minutes to 1 hour.
Heat the oil in a large skillet over medium heat. Stir in the onion and bell pepper; cook and stir until the onion has softened and turned translucent, about 5 minutes. Reduce heat to medium-low, and continue cooking and stirring until the onion is very tender and dark brown, 20 to 30 minutes more.
Split open the baked sweet potatoes and top with the onion mixture, salt, pepper, and a dollop of sour cream.