In the late stages of the revolution, clans all over Japan were making stands (pro- or anti-Bakufu), but the Tosa daimyo, Yamanouchi Youdou (the one who caused Ryoma's mother's death years ago) just couldn't make up his mind, which made Tosa's situaion very vulnerable indeed. Gotou Shoujirou, a Tosa official, came to Ryoma begging for help.
Now Ryoma was such a kind man that he didn't want anyone to die in any war, but the Choshu and Satsuma were beginning to get restless, and were keen to start one against the Bakufu anytime now. Finally Ryoma thought up a plan: Yamanouchi would suggest to Shogun Tokugawa Yoshinobu to return all the administrative power to the Emperor - in other words, the Restoration. In such a way, Tosa would play their part in the national affairs, and if they could do it fast enough, Choshu and Satsuma would have no excuse to wage any war, since the Bakufu government had come to an end, and the revolution's aim achieved.
Well, they did it fast enough, and Yoshinobu resigned in 1867. However, he had plans of his own - check out the section on the Boshin War for details. Anyway, though Yoshinobu's decisions and actions (like how he abandoned his soldiers and escaped to Edo to flee Choshu and Satsuma) may be cowardly and despicable, his decision to resign his post as Shogun, thereby ending the Tokugawa shogunate, there are some people who think that it might be a wise political decision on Yoshinobu's part(even Aoshi admitted to such!).
Yoshinobu probably realised that if the internal turbulances continued and worsened, civil wars would completely weaken Japan, which would then be easy prey to European colonialist powers. By resigning, civils wars would be reduced, giving Japan the peace it needed so badly. That's perhaps why Yoshinobu had given up resisting altogether after the Bakufu's defeat in the Boshin War, IMHO.
Ryoma thought he recognised the dilemma and wisdom behind Yoshinobu's decision, and was in gratitude to him. To make amends, he tried to get the other Shishis the accept Yoshinobu as an official in the new government, but was refused flast everywhere. In fact, they thought Ryoma was showing his true faces: having his finger in whatever field he could make a profit in, for there were some who suspected him to be in league with the Bakufu as well. The fact that he had his own shipping company, and that he did business with foreigners, add to the notion that all he was after was money. And merchants were despised upon during those days.
One more interesting thing to add. When Ryoma heard of the Shogun's decision to resign, he stayed up all night, conferring with imperial court officials and a few other Shishis, and drew up a list of suggested officials who were to take part in the new government. He wanted to present the list to Saigo the very next day, so that a new government could be set up as quickly as possible, to eliminate any unstabilities in Japan. Now everyone, including Saigo and Okubo, felt sure that Ryoma would nominate himself for an important post since he *was* the hero behind the Restoration. But when Saigo read through the list, *Ryoma's name wasn't listed at all!* Ryoma didn't want to take part in the new government at all!
My guess is that he was really very tired of all the fights of political power. All he wanted to do was to bring down the Shogunate and the unfair social system. Now that that aim was fulfilled, he was content as long as he'd get to spent time with his friends from all circles, irrespective of their caste, originality, philosophy (like Katsu Kaishuu) and anything else which might differentiate them. He just wanted to live happily with all the people he truly loved.