Preheat the oven to 400°F (200°C).
Pat the chicken thighs dry with paper towels, then season generously with salt and freshly ground black pepper.
Peel the potatoes and cut them into evenly sized wedges.
Peel the onion and slice it into thin strips.
Crush the garlic cloves lightly with the flat side of a knife.
On a large rimmed baking sheet, toss the potatoes, onion, and garlic with the extra-virgin olive oil until evenly coated.
Make room on the baking sheet and nestle the chicken thighs among the vegetables. Squeeze the juice of half a lemon over the chicken, pour in the dry white wine, and add the rosemary or thyme sprigs, if using.
Roast for 45 to 60 minutes, until the chicken skin is golden and crispy and the juices run clear (internal temperature should reach 165°F [74°C]).
About halfway through cooking (after 25 to 30 minutes), turn the chicken and stir the potatoes. If the vegetables start to brown too quickly, reduce the oven temperature or loosely cover the pan with foil.
Remove the pan from the oven and let the chicken rest for 5 minutes before serving with the roasted potatoes and onions.