Preheat the oven to 375°F/190°C/Gas Mark 5, no fan (if you have a convection oven reduce the temperature by about 20°).
Season the chicken generously with salt and pepper. It's important to season it on the outside and under the skin.
Quarter and core the apples.
Cut the onions into thick slices.
Place the chicken legs, apples and onions in a big baking dish or a sheet pan.
Drizzle the olive oil over the chicken.
Add a couple of twigs rosemary.
Bake for 1 hour and 30 minutes, then turn on the fan OR increase the temperature by 20° OR place the baking dish under the broiler and bake for about 5-15 minutes (depending on the setting) until the chicken is lightly browned.
My favorite way to serve this is with mashed potatoes.
Enjoy!