hey it happened to me too; after putting my macbook to sleep for a whole night i realized if i leave the keyboard idle for 30 seconds it'll stop working until 20 seconds after i start pressing keys. I never used timemachine, nor iChat, so what I think it's just a leopard problem. pretty sure it's not a hardware so that's not too bad. happened to my boyfriend too, we had to restart to make it normal again. hope it doesn't come back.
but anyway i think kmfischer's last point was right, report it to apple:
http://www.apple.com/feedback/macosx.html
i'm pretty sure there are alot of us all around the world who has this problem, and i'm pretty sure apple employers themselves have experienced it, just hope they don't take too long to fix it.