You can upload local music to Spotify by going through the desktop app, but you'll need to sync it with your phone to listen ...
Spotify has a sleep timer feature in the mobile app that will automatically turn off your music after a set amount of time.