How long are you using avast! antivirus ?
I never liked those cordless things, they tend to "hate" each other and never worked nice and easy as corded thingies. Also, those batteries and recharging them were killing me, so I gave up on them long time ago. I don't even see my cords now, they all are on the other side of the desk anyway...
It could be that there is some other problem on your system, especially because of the fact that rebooting the system doesn't solve anything. As soon as you restart your system avast! is not there any more, so how could it be that avast! causing that issue ? Also, when you completely turn off your computer, that's practically same like when you restart it... the only difference is slight delay (depends on how long you keep it shut off though).
What is your motherboard type ? I've heard some people reported some certain problems with USB mouses and keyboards not working all of a sudden without any reason on ECS K7SOM motherboards. It could be that you may have same or similar problems.
I hope we will find some solution to your problem soon.
Cheers !