Sorry guys but most of you got it wrong.
Power cycling for a few minutes allows the capacitors to drain. Not only the capacitors that are actual capacitors, but one of the problems in board design is capacitance between conductors/circuits, which can cause signals to be all wrong and cause it to freeze. The 2 things that cause it to freeze, 1) wrong voltage that the circuit is unable to modulate to the right voltage, 2) capacitance that messes with signal at high rates.
!st is simple, it can be any component relating to power which is switched such as the resistors overheating that it changes the resistor value or at some point you get capacitance or a bad input voltage that the system cannot account for and so outputs the wrong voltage. In a high rate switching circuit like the CPU, it is very sensitive to small changes in power.
2nd is the capacitance which buffers the signal causing the circuit to be unable to receive signals at a high rate, causing it to freeze as the data/instructions are new jumbled. Having an unearthed metal case makes this problem even worse, and dlink is notorious for this. Measuring dlink with an EM mater i measure 400+ V around the case which is very bad. Such a problem has the chance to fry electronics as well. Switching power circuits to change voltage dont have to operate at high volts, and even if you do, it is necessary to observe the spacing and insulation required so that it does not mess with wifi and in general cause capacitance and with the potential to fry components not rated for the voltage.
This is why some routers have to be power cycled for a few minutes. On a PC the same thing can happen, and this is where leaving it plugged in (but mains turned off with ground connected) can help by pressing the button for a minute to drain the capacitors, which devoids it of power completely allowing things like the bios or any controller RAM to clear when you next boot it.
Some well designed devices, especially those targeted towards enterprise dont need to be rebooted and will run fine for years.
Any device with leaky caps dont work well for power cycling if thats what you're talking about. Power cycling does no harm to devices that do not use leaky caps or anything that wears out from big change. Hard drives that start and stop and make your table shake when it does dont last long from power cycling because of their poor design to dampen any big change, this includes how fast they accelerate the disk to the right speed. I have an old WD green still working fine, because i modified the firmware to disable parking, but my friends same WD green stopped working because he never modified the firmware.
Edit: to be particularly clear about answering the thread, im talking about using the mains which is better than the power switch on the device. No one ever talks about using the mains so usually they'll say unplug because not every mains has switches.