A phone is like a PC. And always been rebooting for optimized performance.
So what did Samsung do, They added in a feature for sceduled restarts.
This my friend sounds like your perfect option, set the phone to reboot every day before you go to sleep. And to unlock the device you are required to input the pin on first boot.
Settings -> Backup and Reset -> Auto Restart
Other than this, i would be suggesting something like Tasker that has alot of control in Automating tasks like MAYBE changing your Login method.
But i would imagine a change of this level requires a user input (Or it would be security concern)
If this is not a good enough option for you, PM me, Tell me what and why you are doing it. And i can come up with a few different solutions.
I have a guess to why you are doing what you are doing, but i aint explaining multiple possibility's on a hunch.
i.e. i have application hide from my App Drawer and require a password to open them.
as an additional safety method. am always passing my phone around and people cannot help but open up your apps like Snapchat. So yes HIDDEN from all.