|Have you contacted HP for support and a solution to your problem, especially if your equipment is still under warranty ?|
If warranty is not an option, I suggest you visit HP forums to see if similar problems exist with the same model PC.
Apart from the above, please confirm if your PC functions without a problem when you run your PC normally. This may indicate something is starting up when you do not move the mouse or use the keyboard for a prolonged time.
I suggest you turn off automatic defrag and indexing that may start to run when PC is left idling.
I also suggest updating drivers, including the chipset drivers, and installing SP1 and SP2 if not done so.
Hope the above helps.