I remember when Charley was on Tramadol, and restless at night, the vet told me it CAN have that effect. Just like some people become agitated when drunk or stoned (not that I would know anything about that
), some dogs become agitated on tramadol. It is often worse at night because darkness creates shadows etc., which add to the agitation. Sometimes pupil dilation is also affected, and that can exacerbate the night time problem.
I found it helped to adjust the timing of her last dosage - hours 1-3 post pill were usually calm, so if I gave her the pill too early in the evening she would be fine until just after I dozed off and then she'd be up pacing. I switched from the 100 mg slow release pill, to smaller, direct-release amounts from the compounding pharmacy, and we found that worked much better for Charley and for me.