Try booting into the Ubuntu Live CD and testing the keyboard and mouse. If they work from the CD, it indicates something is torqued in the install.
If they don't work, test with a Live CD of another distro (
Knoppix would be good for this). If the keyboard and mouse still don't work, it's likely hardware.
Try reseating the keyboard and mouse, then try swapping them with known good items one at a time. It's just possible, though highly unlikely, that both of them rolled over and played dead at the same time.