The answer is rather involved and technical, there's also generally very little the average person is going to be able to do about it.
Most routers run some embedded form of Linux, but the company making the router doesn't bother to change a lot of the default settings that were intended for desktop systems, not embedded platforms with hard resource limits. So every single site you visit creates a new connection log on the router, for no real particular reason since the user can't access it. That log is then maintained for several days or even weeks until eventually your router runs out of memory. On a desktop, the system could just use swap space and keep going, but routers don't have a HDD or any other kind of storage to use for this purpose, so you get a condition known as thrashing. Think of it like someone whose hands are full and is trying to say open a door. It's clear they'll have to set something down to do it, but there's nowhere to set anything down, so they're stuck.
To make things even more fun, in an effort to reduce production costs, many router makers reduce the amount of RAM in the router. Some have as little as 2MB, which is barely enough to run the core services. This is why you see things like the old revision Linksys WRT54GS going on ebay for ridiculous sums of money. It had 16MB of RAM whereas most routers have 8MB or less.
The only fix is to either reboot the router and forcibly clear the RAM or void the warranty on the router and install a custom firmware, assuming there is one that supports your router. DD-WRT has the broadest support for devices, but there are a couple of others like Tomato for a narrow range of routers. Custom firmwares have generally sanitized the settings for routers.