I disagree....there's no story or character arc to SP so don't think think there's a 'right note' to go out on. They've always had unfunny episodes but they've always, and still, have the ability to knock it out of the park.
A lot of good ones mentioned above; a few more:
Entourage -- Initially hilarious but was painfully bad by the end.
That 70s Show -- needed to end before they all grew up
Friends -- I guess they had to keep it going until everyone had banged everyone else
Someone will eventually say the Sopranos, but they will be wrong.