I have my moto x for over a year now. And recently out of nowhere i started facing this problem. I checked all the settings and they were untouched. On further investigation, what i understood from the internet is that some app is not letting my phone sleep. So here is the solution that worked...