My initial thought, since you say that a different keyboard and mouse didn't solve the issue, is that you've got a failing USB port on your computer. Try plugging the keyboard and mouse into a different USB port. If that doesn't do it, then your motherboard's USB controller is starting to go, and that means you need a new motherboard.
Hello,
my mouse and keyboard have stopped working periodically for about two months . the only way i get them to work again is by shutting down my pc and turning it on again. i tried a different mouse and keyboard and they did not work either. i noticed that the lights on the keyboard for num lock, caps lock etc. were not on and when i tried to turn them on by pressing the appropriate key they did not light up. i'm thinking that the mouse and keyboard are not the problem.
i'm running windows vista premium edition (322-bit),
with a AMD Athlon(tm) 64 X2 dual core processor 5000+,
current speed of 2.60 GHz,
memory type: DDR2-SDRAM (PC2-6400/800MHz)
and the mouse and keyboard i use are HP they use cords to connect to the computer. i was able to post this after i turned off the computer (which i was only able to do by pressing the on button) . I don't want to keep turning off the computer in order to get the mouse and keyboard working. if any one has any suggestions of what the problem might be or ideas on how to fix this i would greatly appreciate it. thanks for your time.

Chowhound
Comic Vine
GameFAQs
GameSpot
Giant Bomb
TechRepublic