It pays to be specific in your terminology. "sleep"is a term usually associated with monitor(s) - at least in my case.
Presuming you are actually referring to system suspend/hibernate, there are various options depending on power management agent in control. The Arch linux wiki is an excellent resource for all things Linux - have a look at
this page - the bit under sleep hooks is what you are after.