I had a similar issue not too long ago. After some troubleshooting it turned out my motherboard was slowly on its way out, ended a few weeks later when it wouldn't even boot to bios anymore. But this started as sometimes the mouse being unresponsive, keyboard not lighting up and external usb HDD losing connection etc.
Try booting in safe mode, check if there are any issues.
Is the keyboard or mouse becoming unresponsive in bios? That can help eliminate an os issue.
Strip the pc to bare essentials (cpu, motherboard, one stick of RAM and essential peripherals; Mouse, keyboard only) Just to make sure no other devices are conflicting.
Cant see it being a PSU issue but you never know...
Luckily my i5 was 3rd gen with a simple motherboard so I just took it as a opportunity to upgrade to newer components.