You gave a rymadal before going to the vet. So if you found reason for the rymadal, then there's reason for the tramadol.
It sounds like pain to me, maybe in the neck. But there are so many things that could cause those symptoms.
If it was sudden, then maybe a pinched nerve, was laying wrong and tweaked it when getting up, just a quick owie that hurts a lot.
We went for a long walk 6 months ago. Toward the end we had to stop and lay in the grass with Ryan. Then a little slower the rest of the way home.
Next day we went to a local dog show. He yelped when Jet ran into him. Pooped liquid when there and was just a little slow. The next day he could barely walk around the block. It took us about 30 minutes to do what would normally take 5 on a slow day. We were at the vet later that day - turns out Ryan had a huge clot in his neck - which started a long chain of events/problems that we still don't know what is. He would shake when he was hurting.
Hopefully what you are seeing is something simple with an easy fix or even better, something that has already resolved itself.