I would say by working at the nuclear power plant. As for how he can afford so many (as Marge has lots in some episodes) that would most likely be down to finding them cheap and bulk buying. However, this is speculation. For all we know, Marge could have been given them years ago and Homer may not have even bought them.