Your dog is showing signs of restlessness or pacing that can be due to pain caused by bloating. This condition is called canine bloat. It can not be treated at home that is why I can not recommend any medicine. During bloat, dogs get gases in the stomach after eating. These gases increase pressure on the surrounding organs and veins.
This condition is treated by passing a tube in throat. This can be done by vets only. You should wait till morning and take him to vet as top priority.
This condition is treated by passing a tube in throat. This can be done by vets only. You should wait till morning and take him to vet as top priority.