Your dog will know that at night it is separated from you for as long as you are asleep and they react to this separation with characteristics or anxiety. These characteristics are similar to anxiety characteristics in humans.
Pacing and restlessness is your dog's way of showing this anxiety, a bit like when you leave a child at nursery or school for the first few months. This will distress them and they will feel confused and lonely as to why you leaving them alone.
This is not an illness that can be fixed with medication, but managed by the owner. You may wish to seek help from a dog trainer to look at ways to keep the anxiety levels in your dog as low as possible so that it does not cause him or her large amounts of stress.
Another option is to get your dog used to being away from you for shorter periods during the day. This way, it will get the dog used to the fact that you are coming back and will make it feel less anxious at night as it will learn that you do come back.
You could also give your dog something to distract them at night. Maybe a toy or a treat that will keep it occupied but also show that you are not going away forever as you love it enough to give out treats and toys to play with. You could also look into music. You could listen to this music with your dog in normal surroundings so that it associates the sounds with comfort and being around you, so that listening to it at night, your dog will feel at home and not away from you. A common trick with puppies is to bury a ticking clock or watch into a dog's blankets as this imitates the beating heart of the puppy's mother.