In a superior or advantageous position.
This is an American phrase - which is unsurprising as the grey catbird which is the probable source of the phrase is a North American species (there's also an Australian catbird). It's one of a group of birds called the mimic thrushes. They include mockingbirds and, as you might expect, they are adept mimics. The catbird is named for its ability to mimic the sound of a cat's miaow.
Catbirds seek out the highest perches in trees to sing and display. The allusion to that is most likely to be the derivation of the term. It may also be the source of an earlier term with much the same meaning - 'sitting pretty'.
The phrase appears to have originated in the American south, although the date and circumstances are uncertain. There's certainly an association with the sport of baseball, and most of the early citations of the phrase mention the game. That includes the first mention of it in print, in James Thurber's 55 Short Stories
from New Yorker, November 1942:
"She must be a Dodger fan. Red Barber announces the Dodger games over the radio and he uses those expressions... 'sitting in the catbird seat' means sitting pretty, like a batter with three balls and no strikes on him."