The answer would be: accumulate the melanin granules on their superficial portion, forming a UV-blocking pigment layer
The number of melanocyte cells is not much compared to keratinocytes. That is why melanocytes secrete dark melanin granules that will be spread into keratinocytes, not to itself.
The nutrient should be provided by the blood vessels of dermis skin. There should be no problem with pH or temperature either.