well this issue might be the cause of several components, might be the power supply, or the ram, or the hdd, or the motherboard.
i don't want to assume that it's the motherboard so why don't you start by the easy test, which is power supply or ram.