According to Engadget, the bigger risk to your PC during a power outage comes when electricity returns, not while the power is off. The restoration process can send surges that damage connected tech. The article advises unplugging your PC to keep it from getting fried.

The recommended step is simple: when an outage begins, disconnect your PC from the wall outlet. Wait until power is fully restored and stable before plugging it back in. Doing so can prevent damage that would otherwise require costly repairs or replacement.