How best to take Elastic master nodes down, make configuration change and then start them up?

Sounds extraordinarily complex compared with simply moving some files around, but it is feasible to do it that way too. I recommend you read https://www.elastic.co/guide/en/elasticsearch/reference/current/add-elasticsearch-nodes.html#add-elasticsearch-nodes-master-eligible carefully since removing master-eligible nodes from a cluster needs extra steps sometimes.