A router is way better than a jigsaw. A 1/4" spiral bit works really well. You should also pick up a roundover bit to roundover the top 2 edges of the rail to "break" them. Better for the foam and comfort.
No question a router is the tool of choice. But a jigsaw is adequate if it's what you've got. It got the job done for me, and I wouldn't hesitate to use it again.