As there are so many causes of melanosis, it is important to first try to identify exactly what is causing the hyperpigmentation and removing the cause or targeting the cause is the most effective treatment. For example.
If it is caused by medication the medication causing the melanosis must be stopped.
if it is an endocrine disorder the corresponding disorder must be treated
If it is caused by an inflammatory disease of the skin then treat that disease.
If the hyperpigmentation is mainly in exposed areas, sun protection is essential. There are a few disorders of melanosis that can be treated with photoelectric devices, but the choice must be judged by a medical professional.