Hello, my name is***** and I have over 20 years of experience as a veterinarian. I am sorry to hear that your fellow is not himself, with a decrease in appetite, urinating in his sleep last night and possible constipation.
Are you sure that he is constipated? is he straining to pass hard, dry, small pebbled or large, hard to pass stools? Or is he not passing much stool?
Did his appetite wane first or did his decrease in stool production happen first?
Is he an intact male or has he been neutered?
How is his urination when he consciously goes? Does he have a good stream or does he strain and seem to dribble a bit?
Does he have any trouble getting around? Does he seem weak or painful in the rear?
If he isn't eating well he won't have much stool to pass, so that would make sense if his appetite fell off first.
But if he is straining and isn't able to pass much stool, and what he is passing is very small and/or hard then the difficulty passing stool may be causing his loss of appetite, because his ingesta is backed up.
If he isn't neutered then a large prostate may be making it difficult for stool to get out of the large intestine. We see lots of older dogs have trouble with benign prostatic hyperplasia due to the lifelong effects of testosterone. While this isn't a tumor it does mechanically inhibit normal stool passage. And if he has a prostatic abscess or infection that too will cause difficulty passing stool. Prostatic trouble would also explain his urinary accident last night as well.
Older dogs with spinal arthritis may have poor nerve function to the large intestine and urethra, so they may have slow passage of stool, and that can lead to constipation, and weakness in the urethral muscle that controls urinary continence. These pups may have accidents, especially at night when they are very relaxed and sleeping, may have difficulty maintaining a normal stream when consciously urinating and emptying their bladder which can predispose to secondary urinary tract infections.
At this point your fellow should see his veterinarian for an examination, making sure to perform a rectal and check his prostate. Even neutered male dogs can get prostatic tumors unfortunately. I would also want to check a urinalysis and a complete blood count and biochemistry panel to make sure organ function is normal. Dogs with organ failure can have dry stools, eat poorly, and will drink more water which can lead to overflow incontinence accidents as night. If his prostate feels large, or if I cannot palpate a prostate rectally (which can indicate it is so large it fallen out of position and is down in the abdomen) then radiographs of his abdomen or an ultrasound would be a great idea.
In the meantime push fluids. They will flush out his urinary tract, and help keep his stools soft. Add warm water or low salt beef or chicken broth to every meal. To stimulate his appetite feed a bland diet of 1/3 boiled, lean hamburger (or boiled, white, skinless chicken), all fats drained off the meat, mixed with 2/3 boiled, plain white rice. Feed several small meals a day.
Please let me know if you have any further questions.