Hi,
I have the same issue as you do. Keyboard and trackpad seems to go into sleep after some inactivity and takes a few seconds to "wake up" again.
I am using a Logitech wireless mouse using a nano-receiver. This mouse doesn't have the problem.
The problem seems to go away when I cleaned out the content of:
/Library/LaunchAgents/*
/Library/LaunchDemons/*
/Library/StartupItems/*
Actually I copied them and cleaned them afterwards. I havn't taken the time yet to put things back one by one, but here is my content for anyone to try to cross reference to see what might be offending agent/daemon:
bash-3.2# ls -lR /Library/Launch*.old /Library/StartupItems.old
/Library/LaunchAgents.old:
total 24
-rw-r--r-- 1 root wheel 697 May 25 02:31 com.Logitech.Control Center.Daemon.plist
-rw-r--r-- 1 root wheel 788 Jul 27 12:51 com.google.keystone.agent.plist
-rwxr-xr-x 1 root wheel 395 Oct 14 2010 com.hp.devicemonitor.plist
/Library/LaunchDaemons.old:
total 32
-rw------- 1 root wheel 605 Aug 31 2011 com.dymo.pnpd.plist
-rw-r--r-- 1 root wheel 814 Jul 27 12:51 com.google.keystone.daemon.plist
-rw-r--r-- 1 root wheel 568 Mar 10 2011 com.microsoft.office.licensing.helper.plist
-rw-r--r-- 1 root admin 374 Feb 3 2012 com.telldus.service.plist
/Library/StartupItems.old:
total 0
drwxr-xr-x 5 root wheel 170 Jan 10 2012 ChmodBPF
/Library/StartupItems.old/ChmodBPF:
total 24
-rwxr-xr-x 1 root wheel 959 Jan 10 2012 ChmodBPF
-rwxr-xr-x 1 root wheel 2551 Jan 10 2012 README.macosx
-rwxr-xr-x 1 root wheel 84 Jan 10 2012 StartupParameters.plist
I my self suspect the Logitech driver as it has todo with USB.