This is probaly the best article that you need to read after reading another one of those 'detecting sexual orientation with dating profile pictures/prison inmates/etc' papers:
you mistake sleep for being idle. Sleep is a vital part of our self-improvement. And the AI must also necessarily do things that will not lead to self-improvement, but are important to self-sustaining.