Whether you just want to conserve your laptop’s battery or you’re taking full advantage of your solid state drive, some people prefer hibernation to sleep. Ubuntu’s settings don’t make it easy to enable auto-hibernation, though, so here’s how to do it yourself.
While you can specify that your computer hibernate when the laptop lid is closed, or when the suspend button is pressed, you can’t choose to hibernate instead of sleep after being idle for a short period of time. If you want to save precious battery on your laptop or netbook, though, hibernation is a good choice—and if you have a solid-state drive, it won’t even take much longer to wake up.
To change this behaviour, you’ll have to do it manually. Open up a Terminal window or hit Alt+F2, type in gconf-editor and hit Enter. In the editor, navigate to /apps/gnome-power-manager/actions/ through the sidebar. Double click on the value of sleep_type_ac (which is probably suspend by default), delete it, and type in hibernate in its place. Now, your computer should slip into hibernation intstead of sleep after the amount of time specified in your power management settings (accessible from System > Administration > Power Management). Note that you need to make sure hibernation actually works for your system, as some computers have problems with hibernation in Linux.
Make Ubuntu Sleep Instead of Hibernate [Tips4Linux.com]