Whisk the marinade ingredients in a large bowl. Add the chicken and turn to thoroughly coat. Cover and refrigerate for at least 1 hour or up to 24 hours.
Preheat the oven to 375 degrees F.
Combine the onions, mushrooms, and garlic in a large bowl. Drizzle with the oil, season with the salt and pepper, and toss to coat.
Spread the vegetables on a rimmed baking sheet. Nestle the chicken thighs, skin-side up, among the vegetables. Scatter the thyme and rosemary sprigs around the pan.
Roast in the oven until the chicken is cooked through (a meat thermometer will register 165 degrees F when inserted in the thickest part not touching the bone), about 35 minutes. If the skin is not golden yet, turn on the oven broiler and continue to cook until the skin is golden brown, 1 to 3 minutes more.
Remove from the oven and discard the thyme and rosemary sprigs. Taste the mushrooms and season with additional salt if desired. Serve warm with the pan juices and fresh thyme or rosemary for garnish.