Its always difficult to make that dreadful decision, but one of my criteria is whether the animal is able to perform its personal functions without interference. If it is just leakage overnight or in his bed, this could be caused by his prostate gland having become enlarged, but if he is unable to control when he goes i.e. wees indoors or doesn't seem to know when he is actually going, then you may need to consider whether it is kinder to make the decision, particularly if he has been a clean dog all his life. Loss of dignity is a sad thing to witness in a faithful friend.
Take him to the vet, they will do all they can, if they can. If the decision is inevitable, remember, better a day too soon than a minute too late.