I'm so sorry for your dog's difficulties. It's so hard to have to say good-bye to a beloved companion. From your description, I would agree with your vet that the time is rapidly approaching. And I think you understand that too, it's just that you want to put this off as long as possible and I understand that.
Of course, end stage kidney disease makes it much more difficult to use medications as so many of them are excreted by the kidneys and with them not working well, the effects can be quite prolonged. One thing that you could try would be to use benedryl. While it is not a sleeping pill, it has side effects that often make dogs sleepy and that may help. The dose for the dog is much higher than the dose for you and me. It is given at 1mg/lb of body weight and the typical pill is a 25 mg tablet. So if your dog is 50 lbs, you could give two pills before bedtime. It may make the mouth a bit dry, but otherwise is usually well tolerated and should not interact with the tramadol.
Hope this helps for a night or two. My thoughts are with you as you navigate this most difficult part of pet ownership.