We would have to ask an expert in the history of science as to the exact development of the principle of stationary action. But my expectation was that there were more complex alternatives to the principle of stationary action. Occam's razor was used to prefer and concentrate on the principle of stationary action which was established as the best alternative.
So it is the development of the principle of stationary action by preferring the simpler theory that is an example of the use of Occam's razor.
I'm having trouble making sense of this.
The principle of stationary action is a mathematical trick for manipulating equations of motion, especially in cases where you want to impose constraints. You usually start with some known equations of motion, and define the action so that you get back the equations of motion from the principle. You can then modify the action in specific ways to impose constraints (e.g., the method of Lagrange multipliers), and then using the principle of least action gets you the equation of motion with the constraint imposed quite easily.
The principle is also quite nice in that it can be generalized fairly widely, and also provides a neat conceptual bridge from quantum to classical mechanics. In Feynman's path integral formulation of QM, a system takes every conceivable path from an initial to a final state, and these paths are all weighted by a factor of e^{iS/ћ}, with S the action and ћ the reduced Planck constant. The principle of stationary action holds approximately when S is very large compared to ћ, since deviations from a path with stationary action will tend to destructively interfere and cancel each other out. (I recommend Feynman's
QED: The Strange Theory of Light and Matter for a layman-accessible book that talks about this matter, but without the jargon.)
But the point is, the principle of stationary action is not a hypothesis about what the world is like that has competed (or is competing) with more complicated hypotheses that were rejected in favor of this principle. It's a mathematical trick, although an extremely useful one.
The fundamental idea of Occam's razor is choosing the simplest explanation among others as a basis for some phenomenon:
"Among competing hypotheses, the one with the fewest assumptions should be selected."
Similarly, of all possible avenues for a system to take from state A to state B, the simplest one (least action) is chosen in developing the lagrangian.
I find that to be a provocative similarity -- but each to his own.
The principle of least action doesn't have anything to do with hypothesis selection.