Melatonin is in the same class as vitamins are. It's not really a drug, it's what your body already naturally produces that tells you it's time to go to sleep. It's pretty benign and I can't think of any negative reactions with other drugs (MAOIs + melatonin may be dangerous though, I'm not sure.)
MAOIs have a whole laundry list of drugs and even foods that can be dangerous and even fatal if you take or eat the wrong thing. Doctors don't like to prescribe them much because of this reason. You should be aware of what you can and can't take if you are prescribed. I don't even want to tell you what's safe and what's not safe to take on MAOIs and if I were you, I wouldn't listen to anyone on this site. Ask a doctor or a pharmacist or maybe try to find some official online literature (though I would be super careful about trusting even that.)