Both Xanax and melatonin are sleep inducing drugs. So if you take both of them you will be experiencing excessive sedation and next day drowsiness. As such there is no contraindication to use both of them together, but better to avoid.
Prozac and alprazolam can be taken together.
While taking alprazolam which is a benzodiazepine drug, whose main indication is to induce sleep, it is better to avoid other drugs which are sleep inducing and drugs which have an propensity to cause sedation.
Health Tips
Than taking multiple drugs for sleep you can try non pharmacological methods. Try practicing sleep hygiene techniques, sleep restriction therapy, stimulus control therapy. These are easy to do and have good results without any side effects.