A person have a certain type of sickness, that urges his body to move frequently at random times (he cannot predict when). Like an example of it is stretching your feet or hand. If he doesn't do it he feels pain. This happened because of a physical accident he had. And this urge happens so many times that it can be categorize as a sickness. And also on the other hand, if he follows that urge consistently it progresses him towards cureness (contrast this with itching which doesn't guarantee to make the sickness go away rather may make it worse when you scratch it). And that urge happens when his doing Salat, making him unable to stay quiet (making a movement that is not in the Salat frequently because of his sickeness) but that movement is not coming from himself (doesn't come from his intention or his own plan aka it is not something planned by himself) rather it comes from the condition/need of his physical body. Yet he is still able to focus on his recitation while doing so. To explain this, remember that when you move in Salat from one position to the next and say takbir doesn't mean you can't focus on your recitation (the takbir in this case). .
Is his Salat not valid? So what ought he to do?
I remember correctly pregnant women if not able to prostrate when salat then they are allowed to do it by sitting. Compare it to in this case to when one is unable to not move (stretching frequently) because he feels unbearable pain in his body, is he allowed to move by reason of sickness when salat?