It seems like a totally different skill set, what happened to all the sailers who were experts at climbing tall masts of ships when there were no longer any masts?
The first steam powered warships still had masts and sails because they were never intended to be constantly under steam. The space to store that much coal would make them ineffective as warships.
Instead the boilers would be lit for battle giving them an edge over purely wind powered adversaries, and possible if ever becalmed or attempting to reach port during adverse conditions.
But eventually navies stopped building warships with sails, so yes what happened to all the topmast men? Well there was somewhat of a career progression that the youngest most agile crew handled the upper most sails, with older crew handling the lower sails and then potentially receiving a promotion to petty officer that kept them out of the yards. Usually things like Carpenters mate, sailmakers mate, quartermasters mate etc. Working in the yards was hard work, but it was also considered a basic skill for ordinary seamen.
As less topmen were needed they would very likely have simply transferred to other skillsets. in 1853 the royal navy stopped the forced conscription of men into the navy, instead adopting 10 year terms of service to ensure there would always be sailors trained in naval combat and weapons handling, not just ship handling.
Meanwhile civilian trade was booming. Golden age of piracy was over, weather almanacs had been compiled, shipping lanes charted long distance trade was cheaper and safer than ever. Any out of work military sailors could find civilian work, and working a sailing ship had to have been more comfortable than shoveling coal.
The flying P- liners, a group of 3000 to 5000 tonne cargo carrying sail ships operated from 1850's to 1940. When countries were building fleets of diesel powered aircraft carriers there were men climbing masts hauling on sails and ropes crossing oceans carrying trade goods.
So any sailors who only wanted to work in the rigging could remain doing so somewhere for the rest of their lives. But they were also needed for other jobs on modern ships.
Hi there, I wrote about this before, and also more on the transition here. Those are older answers so please let me know if you have follow-up questions.