Moto X’s Sleeping Assist helps you get a good night rest. It automatically silences your phone for incoming calls and notifications during the preselected hours. Now you can bring Moto X’s Sleeping Assist like feature to any Android phone with an Xposed module called XQuietHours.
XQuietHours is a clone of “Quiet Hours” feature of CyanogenMod ROM. Like Moto X’s Sleeping Assist, Quiet Hours silences your phone during your sleeping time (that you can set with in the app) and makes your sleep time more efficient.
How to use XQuietHours.
As said above, XQuietHours is an Xposed Framework module, which means you need a rooted phone with Xposed Framework installed on it.
Using this app is simple. Just install the XQuietHours app (download it from here), activate it and reboot your phone.
Then, open the app and set time range and notification options. That’s it! In addition, this module allows you to decide which days “Quiet Hours” should be active (source)