This freezing is known as "Fermi freeze". The easiest solution is to simply update to Mac OS X Lion. However, if you wish to remain on
Snow Leopard, you can use the following steps to disable the "Fermi freeze" feature.

Open Terminal and enter the following command:

sudo defaults write /Library/Preferences/com.apple.loginwindow DisableFermiFreeze -bool false

Restart your Mac and