I'll attempt to write the whole scenario, so everything is in one place about changing the leader and reverting.
Scenario: Three nodes are swarm1, swarm2 and swarm3. First leader (that needs resource upgrade is swarm1)
Step 1
Make swarm2 as leader
docker node promote swarm2
docker node ls
Make sure that the swarm2 Manager status is Reachable (Not Down)
Step 2
Demote swarm1 now to a worker
docker node demote swarm1
docker node ls
Ensure Manager status for swarm1 is now blank.
You may remove the node from swarm.
From swarm1 node, issue:
docker swarm leave
Do the necessary upgrades to the swarm1 node and join it back to the swarm.
Step 3
Rejoin to the swarm and change lead.
From swarm2 issue
docker swarm join-token manager
From swarm1 node issue the join command
eg:
docker swarm join --token <token> <ip:port>
Step 4
Now re-elect the leader.
From swarm1 issue:
docker node demote swarm2
docker node ls
Now you should see your old configuration with swarm1 as leader.