As long as you've got background downloads enabled, your PlayStation 4 will automatically download patches and firmware updates while your system is in Rest Mode. However, up until system software v2.50, you had to manually turn on your system in order to install any operating system overhauls. That's no longer the case, as an automatic install option has been added.
From the PS4's home screen, push up on the DualShock 4 to reach the top layer of the system's menu, and scroll to the toolbox labelled 'Settings'. Select it with X on the controller.
When the long list of options appears, scroll down until you reach an option named 'System', and select it.
In the 'System' submenu, you'll find an option labelled 'Automatic Downloads and Uploads'. Scroll down to it, and select it.
You'll be faced with a list of actions which will be performed while your console's in Rest Mode. Ensure that 'System Software Update Files' is checked, and scroll down to 'Install Automatically'. Tick this box, too. Remember, that you'll need to allow your system to stay connected in Rest Mode for this to work. To do this, go to: 'Settings' > 'Power Save Settings' > 'Set Functions Available in Rest Mode' > 'Stay Connected to the Internet'.