Spikes and surges can considerably shorten the working life of your power supply components, leading to unreliable operation. The role of the UPS should also be to smooth these out during normal operation, not just when the power is cut. The sacrificial surge protectors (MOVs - metal oxide varistor) inside will eventually break down, hence you see lots of discarded UPSs where the batteries still have life left in them. If you disassemble a power supply, you will find these as a blue disc the size of your fingernail, often close to the fuse and where the mains power enters. Unless you have had a major surge such as a lightning hit, they will not be charred and black if they are damaged, as their sacrifice goes on, absorbing spikes less and less during their life. It is not normal maintenance procedure to replace these regularly, the cost of labor being far more than the cost of the MOV. The UPS is discarded and a new one takes its place. The projected lifetime is not a marketing ploy by the UPS manufacturer, but a reliable estimate of field conditions and protection offered. Five years is a common life, usually involving one replacement set of new batteries.
How old is your UPS?
Is your power surge traveling through your connecting cables such as Ethernet? An earth loop?
The laptop by default acts a battery backed UPS too. Maybe put it on the same circuit as the UPS and router, and the voltages will then be stable, the laptop battery still working as its own UPS once the router one gives out.
The laptop power supply should also have some surge suppression MOVs too, and they may have broken down as well, letting spikes through. How old is the laptop power supply?
Are your power surges short spikes or brownouts over a longer period of a few seconds? Maybe a surge protected power board that also has MOV protection for USB and Ethernet ports may be a option. These are often built into UPS devices too.
Contact your power company and check if yours is an isolated situation, or if it is common in your area. They have sensitive monitoring equipment they can install on your premises for a extended period such as a week or month that can analyze the extent of the problem. Are your neighbors experiencing similar problems? Is there a faulty street power transformer close by? Do you have external power lines that have tree branches rubbing against them causing power surges and possible fire hazard? Is your household voltage too low, at the end of a long power line, or worse, close to the transformer and very high? They should be able to tell you and offer remedies.
Also have your power distribution board (where the meter is) checked for any poor connections, especially for the common neutral link that can cause brownouts and voltage fluctuations. If living close to the ocean, salt corrosion in the air can often makes these unreliable. Your electrician should be able to advise the appropriate remedies - whether a airtight barrier or spray or just regular tightening of the connectors may be preventative maintenance.
So short term suggestion: Plug your laptop into your UPS that powers your router. Does that solve the problem?
Do the other checks anyway, as the UPS is only masking the underlying issue.