I have never been able to fully exercise right out the gate when I would withdraw from heroin. I did find though that the days that I forced myself to just walk, walk, walk that I was able to get in a better mental space then just thinking "I feel sick, I feel like I am going to die, etc...you know the drill".
Any type of movement I think is helpful, also forcing yourself you drink as much fluids as possible, and forcing down food and taking vitamins have all helped in the long run.