Preheat the oven to 200°C (180°C for fan ovens).
Rinse the chicken thighs under cold water and pat them dry thoroughly with kitchen paper. Season generously with salt and freshly ground black pepper.
Peel the potatoes and cut into even wedges.
Peel the onion and cut into thin slices.
Lightly crush the garlic cloves with the flat side of a knife.
In a large roasting tin, place the potato wedges, sliced onion and crushed garlic. Drizzle over the extra-virgin olive oil and toss by hand to coat the vegetables evenly.
Push the vegetables to the sides of the tin and place the chicken thighs in the centre. Squeeze the juice of half a lemon over the chicken, pour in the dry white wine and scatter the rosemary or thyme sprigs (if using).
Roast for 45-60 minutes. After about 25-30 minutes, turn the chicken and stir the potatoes. If the potatoes are browning too quickly, reduce the temperature or loosely cover with foil.
Check that the chicken skin is golden and crisp and that the juices run clear (the internal temperature should reach 74°C).
Remove the roasting tin from the oven, leave the chicken to rest for 5 minutes, then serve with the roasted potatoes and onions.