That depends on the size of your sweet potatoes and what method you're using to cook them. Microwaving a sweet potato takes 5 to 7 minutes. Boiling sweet potato cubes takes about 15 to 20 minutes. Cooking sweet potatoes in the Instant Pot takes 25 to 45 minutes. Cooking sweet potatoes in the oven takes 45 to 50 minutes.