There are a couple of possibilities. If your laptop supports Suspend-to-disk, it might work out of the box. I'm not sure if ACPI "sleep modes" or APM suspend/standby support are required.
Another possibility is compiling a custom kernel with Hibernate support - it is a completely Linux-specific implementation of the suspend-to-disk, and it should work whether your computer supports "suspend-to-disk" or not.
Some laptops go to sleep automatically if the battery is low and the battery is calibrated (=shows right amount of power left). If your's is not one of these, check HOWTOs and other documentation about powersaving, from
www.tldp.org, for example.