Here are some things people forget, when it comes to Riker turning down his own command:
1. By the 24th century, captains were rarely supposed to leave the ship on away missions. I think Riker understood this, especially when he brings this up to Picard, himself. Perhaps Riker felt he was too young to give up away missions.
2. Riker was only 35 at the time of Encounter at Farpoint, and McCoy was 135! People live a lot longer by TNG. So, what is the rush? Riker, in fact, ANY starfleet officer will likely have a career spanning at least 50 to 60 years by the 24th century. Picard did, at least (from 2323 to at least 2379!). If that is the case, what is the rush for Riker to assume a command at age 35?
3. The ships Riker was offered in TNG were DOOMED. The only reason they were brought up narratively, was basically to show Riker dodged a bullet and actually made the CORRECT choice in turning them down.
USS Drake (Destroyed just before the events of Arsenal of Freedom)
USS Melbourne (Destroyed by the Borg
USS Aries (doomed to be boring: deep space sensor sweeps...hardly a career builder, there. Riker would have been bored doing it)
4. Riker DID make captain, TWICE. Had he not saved Picard, he would have remained captain of the Enterprise. Therefore, technically speaking, Riker achieved his goal of becoming captain before 40, and when he did captain the Enterprise, he proved himself much like NuKirk did. Then, of course, there is Titan.
5. Let's not forget that under Riker, Earth was saved in BOBW. Riker would have had a command of his choice, possibly even the Enterprise, if he really wanted it and pushed for it. Picard would likely have even let him have it for saving his life, because it is revealed in Family, he was considering leaving Starfleet anyway. After saving Earth, I think Starfleet would wait as long as Riker felt he was ready to accept a command. Obviously, they did, hence his command on the Titan. And really, after saving Earth, if Starfleet dinged Riker for not taking a command right away, would they be an organization worth working for, anyway, if that's the kind of thanks he got?
6. Everyone bashes Riker for not taking a captain's chair, saying it hurt his career. Well, by that logic, why aren't we questioning why Picard turned down the admiralty on multiple occasions? The answer is that both Riker and Picard had distinguished careers, and stayed where they believed they would do the most good. AND I think Starfleet recognized that.
7. As previously pointed out by others, Riker felt it was better to be second in command of the Federation Flagship with all the adventure that goes along with it, than to command an insignificant, older ship in the hind end of space.
8. Riker felt the Enterprise crew was his family. Riker didn't have much of a real family growing up and was estranged from his father. In many ways, Picard was probably a father figure to Riker. Riker was good friends with Worf, Data, Crusher, and Geordi. Also, Troi, who ultimately became his wife was on the Enterprise, and I think that played no small part in his decision to stay (It did in the Icarus Factor, and re-affirmed with his jealously of Worf and Tom Riker, and ultimately marrying her in Nemesis).
9. Ultimately, serving as Picard's XO for 15 years, and assuming command at age 50, made Riker a far better captain than if he jumped on the first command that came his way, IMHO. Age 50, in the 24th century is not OLD. In fact, that is probably the average age people make captain, anyway.