A router is a computer, and as with any other, it has components like a processor and memory that juggle data every second of the day. Over time, that memory fills up, temporary files pile up and performance tends to dip. Restarting your router clears its memory and cache, fixing any temporary hiccups and giving the system a fresh start to work properly again. The benefits are similar to restarting your phone regularly.
That same reboot will also refresh your connections between your router, modem and internet provider, clearing up any communication problems. Furthermore, it forces the router to rescan Wi-Fi channels to select less crowded ones, which can boost your wireless speed. Additionally, it restarts security processes, which can disrupt certain types of malware and remove temporary connections that attackers might exploit.
One detail to know is that a reboot is not the same as a reset. A reboot is simply turning your router off and on again, keeping all your settings intact. A factory reset, on the other hand, wipes everything back to out-of-the-box defaults, including the network name and password. That's not something you'll need to do unless you're working through major troubleshooting or plan to give away the device.
Governing bodies recommend you reboot your router regularly. The FBI says you should do this when you notice anything suspicious. The NSA mentions scheduling weekly reboots for all your devices, including routers, smartphones and computers.
There are signs that appear when your router is in need of a reboot. One of the most obvious clues is when your internet speed is slower than usual. Another is when your Wi-Fi gets spotty or keeps dropping every so often. Also, if your devices keep falling off the network or you get lots buffering when streaming or downloading, it's a good idea to restart the router. For any areas that consistently have a bad connection even after rebooting, you might want to look into mesh Wi-Fi or range extenders.