I guess it depends. Most shows I've enjoyed have gone on for one or two seasons too much and became a shell of their former selves.
Some like Melrose Place or TNG needed a season or so to find its footing then took off giving several solidly entertaining back to back seasons before sucking. Others are great from the beginning going on for several years before crashing and burning(Roseanne, The X-Files, The Golden Girls etc)
It just seems when a show is just starting and is fresh and new the writers are more excited about it and come up with a lot of good ideas. After churning out several years of consistently good hours, it is only natural that the writers simply burn out and run out of ideas and only because of network insistence due to good ratings is the show kept around resulting in the writers struggling and grasping for ideas leading to cast rotations, stupid story ideas, cute kids being added etc i.e. jumping the shark. It is only after a network has killed the golden goose do they give it the pink slip.
My own opinion is that if a show can give me interesting characters with *fresh* storylines consistently for 4 or 5 seasons I'm fine. I'd much rather a show end at its peak and miss it than see it turn into a hot mess the way so many popular shows do.
I think it is probably harder these days for episodic series to go on very long before getting old to viewers since those type of shows generally tend to just tell the same old chestnuts we've all seen a thousand times. Serialized shows have a better shot at longevity simply because they force greater creativity and a uniqueness tailored to the premise itself--and I'm not talking about the overly complicated messes like Heroes and LOST that drag shit out for years and years--I'm talking about your traditional serial with linear season long storylines with no convoluted timelines, flashbacks, ridiculously large ensembles etc.