You should try the built-in Quiet hours feature. It can work only with Cortana as it is a part of Cortana.
When quiet hours is on, any phone calls you receive will go straight to voicemail, and all notifications will be silent (unless you've told Cortana you'd like to hear from the people in your inner circle).
To turn on quiet hours during night automatically follow these steps :
- Go to Cortana's notebook
- Open Quiet hours
- Turn on Automatic rules and choose your timing
Calls and messages will be shown in action centre where you can check it later.
There is much more functionality in Quiet hours like automatic replies, etc... You can find more information about Quiet hours in these websites.
- Quiet hours in Windows phone
- Quiet hours in Windows10