You should mention in your question about the age and breed of your dog. Heavy breathing at resting in dogs can be due to oxygen deficiency and pain. Pain can be due to injuries, infections, wounds, arthritis etc. Oxygen deficiency can be due to
- Pulmonary edema or fluid in lungs
- Heart diseases
- Pneumonia
- Lung diseases
- Obstruction of the air passage