Start with a vet visit just to safely rule out any underlying health issue that he may have.
Second, even though a dog has had a rountine forever they can change.
I once had a dog that was housebroken for 4 years. Suddenly for no explained reason he started peeing in the kitchen every chance he would get. Even when I caught him in the act he'd just smaile and walk away.
THAT was when I invested in a crate. The dog would then be crate trained. I never had a problem again. All my dogs are crate trained and have been crate trained from day one just about.
If they have the room, the will go and a kitchen is big enough for them to have room to go. One time, as an accident is all it takes for them to realize "Its not so bad to pee on the floor

"
In a crate, there is no room to go off and pee without laying in it.
Good luck, once med is cleared, I would suggest trying crate training.