Combine the salt and sugar in a small bowl. Break up three sprigs of the thyme and thinly slice the garlic. Add both to the bowl with the salt mixture.
Liberally cover the chicken with the salt mixture on both sides, using all of it to achieve a thick coating.
Place the chicken in the refrigerator and chill overnight.
The next day, rinse the chicken and pat dry. Discard the salt mixture.
Heat an oven to 225 F. Place the chicken in a oven-safe dish or pot. Cover the chicken in olive oil and add the peppercorns, bay leaves, and remaining garlic and thyme.
Place the pot in the oven and cook until the chicken is extremely tender -- about 3 hours. Remove the chicken from oven and transfer to a sheet tray.
Turn the oven up to 425 F. Crisp the legs in the hot oven until golden brown, about 5 minutes. Remove from oven and let cool before eating.