This is a subject I can speakto from experience. I walk around bent at the waist like a nearsighted Mr. Magoo looking for his lost contact lens. Seeking relief I found an article detailing the five best exercises to counter the damage done by sitting for years bent over a desk.
My favorite is the Fire Hydrant. You get down on all fours and lift your leg like a dog peeing, carefully stretch and return alternating legs with each rep. I have added extending and returning the leg before setting back down on all fours.
Word of caution. If you are planning on emulating your dog make sure you own a male. If you copy a female you will exercise an entirely different set of muscles.