A dog that pees on the couch when it is time to go for a walk may have excitement urination. The most straightforward solution to this problem is to call him to you every time before showing the leash and telling him it is time to go out. He may dribble when he is excited, so call him to the kitchen or entrance, somewhere you have a tile or hardwood floor, and it will be a lot easier to clean up.
Do not scold him or hit him for doing this. It is not his fault. A lot of dogs grow out of excitement urination, but not all, so calling him off of the couch is the best idea.
I had a dog that would urinate on the couch every time the doorbell rang. He did not grow out of the problem, so these are the steps we used to train him to be less reactive to the bell. https://pethelpful.com/dogs/Help-My-Dog-is-Peeing-... It was not always easy, but sometimes this problem can persist if you are not persistent in getting rid of it.