Meant to add, could also be some nerve damage or spinal issues going on
Oh, probably needs a Vet exam to determine the cause. Dogs, like people, can have incontinent problems as they age.
A change in diet may be a cause.
A change in schedule may be a cause.
This can possibly be caused by problems with the abal glands.
Could be from parasites. Have her stools been checked and has she been wormed?
Could be a problem with the sphincter muscle.
Is he acting normally otherwise? Any signs of canine dementia at all?
Just too hard to even speculate and a consult would probably be a good idea.