Could be lots of crazy things. Any chance your Alt key or Tab key or Left Mouse Click are getting stuck?
Can you find any chain of events that are common when it happens?
It might be a Windows Sticky Keys issue. Do you know what those are? I don't remember how to turn them off, but Google it and see if that might be it.