usb port can go to sleep and not wake up. you might go to control panel device manager, find the usb port for your mouse or keyboard and right mouse click to bring up properties, find the power management tab and see if you can tell windows not shutdown the device to save power.
should prevent a repeat problem of having to disconnect to get the port to wake up. assuming a usb keyboard and mouse connection. if you have a wireless version you might have to update the driver for the device. (or use device manager not to shutdown the device, ie bluetooth or wireless )