Instructions
Return to the Main Observatory. If you're in the middle of a battle or struggling to get through a tough galaxy, finish the stage, and save your game before exiting the observatory.
Locate and use one of the various 1-Up Mushrooms in the Observatory. Toad has a handful of them in a letter from Peach, and there are others hidden around the grounds in strange places.
Enter one of the Observatory's smaller rooms. For time's sake, simply walk into whichever one's the closest.
Turn around, and walk back out into the Observatory. You don't have to play any of the stages located in the room, just go back the way you came.
Find and use the same 1-Up Mushroom that Mario ate before. You can also use any of the others around the Observatory, but since this one's closest, it saves you time to stick with it.
Repeat Steps 3 through 5 as many times as necessary. The process yields an endless supply of mushrooms, so you can load Mario up with enough lives to get through even the toughest stages.