Can you use melatonin if you have pre-existing kidney problems?

Yes you may. Could even be beneficial because melatonin has some antioxidant effects.
Melatonin. It depends on the degree of renal dysfunction. Melatonin does not cause direct renal damage in most cases. However i would use the lowest dose possible when taking otc medicines.