Because of his 12th level intelligence, Brainiac 5's mind isn't infantilized like the other four. He figures out what's been done to them and whips up some pills to return them to normal. He gets the others to take the pills by saying it's candy.
In THE LEGION COMPANION, Jim Shooter didn't speak kindly of this story. E. Nelson Bridwell called him up on the phone (being a young teen, Jim would get all his calls at his family home--imagine that, the kid talking out stories over the phone while Mom and Dad look on) and E.N.B. said that Mort wanted him to write a story where the Legion becomes tots, because stories about the characters as babies sold really well. Jim refused to do, so Nelson wrote the story himself. Shooter didn't think much of it, but it had a lot of the same Star Trek flavour as his scripts and it remains one of the best stories I ever read.