If you're like most users, you charge your phone while you sleep. Instead of manually switching your Android phone to silent mode every night, we'll show you how to do it automatically when charging.
Silent operation on most Android devices does not turn off alarms, which is good if you mute your phone while you sleep. However, we can do better than that. With the "Do Not Disturb" function, you can turn off your phone while charging and receive only important notifications.
The Google Clock application includes a number of tools in the "Bedtime" tab. If you have a telephone Google Pixel or a fairly new Android device, chances are you have extra sleep options with "Digital Wellbeing".
First, download the Google Clock app from the Play Store if you do not already have it.
Open the "Clock" application and then click "Bedtime" on the bottom toolbar.
Then select "Get Started".
It will ask you to set an alarm clock. Press the minus (-) and plus (+) icons to select a time. Tap the days of the week you want to use the alarm clock.
There are some additional options on this page if you are setting up an alarm clock, but for the purposes of this guide, we just need to select the alarm time. Click "Skip" as soon as you are done with this step.
The Clock app will now ask you to set your bedtime. As before, use the minus (-) and plus (+) icons to adjust the time, then tap the days of the week that you want this to happen.
Now, if your device has Digitial Wellbeing, you will see “Bedtime Mode” on this screen. Here we will silence your phone while charging. Set the option.
Click "While Charging at Bedtime" where you will see the wake-up time and sleep we selected in the previous steps.
Below that, you will want to toggle to "Do Not Disturb". This will ensure that notifications are silent while your phone is connected during the selected time window.
Are you ready! Tap the back left arrow icon to return to the previous screen.
Select the "Done" button to complete.
To get the most out of this feature, you need to make sure you have set the “Do Not Disturb” feature. Unfortunately, this process is very different depending on the device.
With all these settings, your phone will be silent at night when you charge it, but important notifications will still come. This is a win / win situation.
Source of information: howtogeek.com