The nigh-irrefutable MacFixIt.com has a report on both PowerPC and Intel-based Mac laptops failing to go to sleep when the lid is closed or involuntarily waking from sleep when the lid has been closed.

The article cites that the problem is often caused by interaction with peripheral devices such as USB, FireWire, Bluetooth, displays and even power connections.
Check out the jump for a full list of available fixes and workarounds.

The nigh-irrefutable MacFixIt.com has a report on both PowerPC and Intel-based Mac laptops failing to go to sleep when the lid is closed or involuntarily waking from sleep when the lid has been closed.

The article cites that the problem is often caused by interaction with peripheral devices such as USB, FireWire, Bluetooth, displays and even power connections.
The following fixes have been offered:
-Set lidwake variable to 0 One option for resolving this problem is to set the NVRAM variable lidwake to 0 with the following Terminal command:
sudo pmset lidwake 0
This setting will cause the machine to resist waking from sleep when the lid is opened. Instead, you will need to press a button on the keyboard or perform another “system event” (such as connecting and activating a USB device) in order to wake the system.
This can prevent instances of the problem where the system erroneously thinks the lid has been opened when it is still closed.
-Deleting power management-related .plist files In some instances, this issue can be resolved by deleting the following files:
/Library/Preferences/SystemConfiguration/com.apple.PowerManagement.plist
/Library/Preferences/SystemConfiguration/com.apple.AutoWake.plist
~/Library/Preferences/com.apple.systemuiserver.plist
then restarting.
(the tilde [~] indicates your home user directory, i.e. /Users/username)
Unfortunately, this fix might not stick, and may require repetition if the problem recurs.
-Turn off Bluetooth devices before putting to sleep Un-pair and power-off any Bluetooth devices associated with Mac portable before putting it to sleep. It appears that turning Bluetooth devices on or off while the system is going to sleep can trigger a disconnection error message, barring proper sleep.
-Gently close lid — ensure sleep is taking place In some cases, carefully closing the lid and ensuring the system has actually gone to sleep (indicated by a slowly pulsating light) can prevent this issue from occurring.
-Unplug/plug first Avoid connecting or disconnecting devices, or connecting/disconnecting power after your portable Mac has gone to sleep. USB devices in particular can trigger a wake from sleep.
-Turn off safe sleep Try disabling safe sleep as described in this article and check for persistence of the issue.
If you’ve seen this or have comments or feedback, let us know.