Has he been to the vet since this started? If a 5 yr old suddenly starts having "accidents", it could be a sign of a problem and he should be checked out. Things like bladder infections, urinary crystals/bladder stones, to even more serious things like kidney disease and diabetes could cause this. Of course, it could easily be behavioral, but you should always rule out the health problems first.