Yes, this works the way you want.
When you have a 'may' trigger (like the Fathom Fleet Captain) you decide whether to do the action when the trigger resolves (including paying the mana in this case).