Ah that's easy -

the expression is "make hay while the sun shines" - ie. make the most of whatever is coming your way, whether it be sunshine, money, good health ...

Origin: I'm sure someone knows better but I would think it has an agricultural literal origin.