I have restless leg syndrome and I am a habitual leg shaker, although I don't absolutely know the two are connected. I think of RLS more in terms of how I find it hard to sit still in confined paces, or when I'm tired, and it's hard to control. What I do at a desk is in my control, but often starts subconsciously.
Some offices make this effect more obvious than others:
- wooden floors carry it better than concrete
- if we use desks with monitor arms, the monitors are supported less stably and are more likely to amplify vibrations
Some co-workers are more sensitive to it than others. I will always stop at least temporarily when asked, but it's certainly not uncommon for a sensitive co-worker to have to ask a few times over the course of a day. I don't ever do it deliberately around a sensitive co-worker, but ... it's rarely something I consciously start anyway.
Not putting my desk near a sensitive co-worker is probably a good start, if that's possible. Finding ways to have very stable desks with shock absorption would be great, although I haven't seen products that do this well that I'd recommend. I'd be curious to try vibration damping pads under the desk legs. Under my legs too, if they'd work under a task chair.
In essence -- in my experience there hasn't been a great solution. I'd love it if someone were to find one. Asking is certain a totally reasonable and sensible approach, but whether you will be able to get relief on this path without feeling like you have to ask constantly is a question that only you will be able to answer.