First off, "freezing" has endless potential causes, so it's hard to diagnose on a forum. I've seen a single corrupt font take down entire creative departments.
So anyway, if it's your USB ports shutting off, none of your other USB devices will work. Next time it "freezes," plug in a USB flash drive (directly to CPU, not into keyboard) and see if it mounts.
If the USB is the problem, it's worth having a tech check the logic board, power supply, etc. I had this problem awhile back with a G5 tower. Logic board was fine. The solution was to use a grounded power regulator/battery backup to give the computer clean and steady power.