Leader of the Jedi Council, Yoda was. For centuries, a Jedi.
To Dagobah he went. For twenty years, lived there did he. Bored, he might be.
Do what, did he?
You have done well, but to succeed, your life must be spent learning, practicing.
Now you see. We have achieved what you seek and live between the realms.
(Destiny: Clone wars, Season 6, episode 12)
Now, does my training begin?
The one you know as Qui-Gon Jinn will commune with you and guide your training.
(Sacrifice: Clone wars, Season 6, episode 13)
Explain, the Priestesses did. Complete his trials Yoda did. Meditation, learning, practice -- spend time with these he must.
On Dagobah -- commune with the Force he did. Alive with the force Dagobah was. For communing and hiding, perfect. Idle he was not -- preparing he was. Something the Priestesses told him...
Like us, you shall learn to maintain your consciousness after death.
Enlightenment, sprit, balance...
There is another Skywalker...
Aside from the needs of survival, spent his time studying the Force he did.
Using an E3-standard starship lifeboat, Yoda returned to Dagobah to begin his own exile. The lifeboat started to serve as Yoda's initial shelter, however, started to degrade within a year due to Dagobah's swampy environment. As the first shelter was slowly consumed by the swamp, Yoda built a new home for himself. He thus settled down to wait for the twins to grow up, and continued his studies of the Force.
To be fair, quite a lot of time it must have taken just to live in some degree of comfort. Building a home for himself no mean feat is, and finding food a non-negligible amount of time too must have consumed. But, in his spare time, with his studies keep up he did, keeping his mind active and his Force knowledge well-honed.