Using an UPS helps a lot. Making sure you have great cables between the modem and the router helps a lot. Turning off the router now and then (like firs thing in the morning-or even putting it on a timer that turns it off and on again when you wouldn't be using it) helps a lot.
If you post which hardware and firmware version of the WRT54G you're using, we could probably tell you if that particular combination has issues and if so what to do about it. You've really just sketched an idea of what you have, so we can't say much more until we know more.