Basically the future Fortress of Solitude regenerated him but it took a thousand years. The reason Starman was sent back and became a gravedigger was so he could steal Superboy's body and put in the same device that healed Superman after Doomsday at the FoS. Brainiac also sent Wildfire, Dawnstar and Polar Boy to steal some of Lex Luthor's hair in the past and used it to finish the regeneration.