I’m a PC guy and we have an option for that sort of thing…a quick google search tells me that it cannot be done on a Mac, but there is an app that you can download that toggles the sleep function.
http://semaja2.net/insomniaxinfo/ – Insomniax
Otherwise, you have to have a monitor hooked up for the “clamshell” feature to work. So, if you are traveling from one room to another and it doesn’t make since for you to carry the laptop “open”, then you are forced to put it to sleep…unless you have the insomniax app.