It really does sound a lot like Canine Cognitive Dysfunction (dementia). Night pacing is one of the classic signs of this. As it progresses, there may be other changes like confusion, disorientation and loss of house-training. It progresses slowly.
My own little dog, Sprite (shown in my avatar) had this. I started her on Anipryl and saw a marked improvement within a couple of weeks. I kept her on Anipryl for the remainder of her days, which was about 4 years. It is not cheap! But it made a huge improvement in her quality of life.
Here are some links with further information:
I hope that helps. If you found this answer helpful, please hit the "Accept" button. If you want further information, just let me know!