sometimes leaving the fork assembled can work - there can be enough pressure on the damping rod to hold it in place while you undo the bolt at the bottom of the fork legs.
But sometimes there isn't - what I have done is make up a tool that just fits down inside the fork leg and locks the top of the damping rod firmly, so the allen bolt can be undone. Just a long piece of steel tube with a 19mm bolt welded to the end. That has worked on a lot of fork legs.
In a pinch - I know that some punters have just pushed a broomstick down inside the forkleg and pushed on it really hard, while someone else undoes the bolt

it has worked though.