well, are you running on battery or AC power? If you are plugged in and that is happening, then you need to change the power management configuration your machine uses. if on battery, plug into the wall!
Go into control panel and then select power options.
Under the power schemes, change the When Plugged in options to never. This will prevent the machine from hibernating. Now if you want to just disable Hibernation, then click on the "Hibernation" tab and uncheck the check box. This should stop it completely. There are also several options that are good to configure under Advanced. For closing the lid and what to do when buttons are pressed.
Hope that helps.