The thing is doctor, that my patient is using bdzs and I want to switch them... So I was wondering if melatonine is good as trazodone?

Not the same at all. Melatonin, trazodone, and benzodiazepines are 3 different things -- & neither melatonin nor trazodone can be used to "switch" from a benzodiazepine. Benzo needs to be tapered very gradually itself, or sleep disturbance and withdrawal could result. Melatonin is not specifically a sedating agent, but trazodone could be used in that way. Melatonin can help initiate sleep but not help stay asleep.
BDZ Tx. Neither is treatment for use of bdzs. Treatment usually involves taper, or use of Phenobarbital in supervised setting, depending on dose and length of treatment.