I don't like this kind of habit. But I do a different kind of job. I download OS ISO regularly. There are many Linux distribution. I like to test them all. I start download a big/ huge ISO and go to sleep at night. After wake up at morning I saw that download has completed and my machine is still running alone. This is also a bad habit. Because it use power/ electricity.
If you are not like this or you just simply want to save power consumption then I think you may need to use a automatic 'Sleep timer'. This little package is very usefull if you want to shutdown your computer at a specific time.
Name of this timer is "GShutdown". It will work on Gnome environment. There are an another same application for KDE. KDE users can use "KShutdown" for the same reason.
How to get it?
Very easy way to install this little and cute application
Just type the command at terminal
sudo apt-get install gshutdownor, if you don't like terminal then you can download it via Ubuntu software center.
After install you will get it from Application> Accessories
Now you use it as your preference. Configure it and run it at night or when you go outside.