Chronic benzodiazepine use is common in patients with mental illness and is associated with cognitive impairment. It is unclear whether benzodiazepine-induced cognitive impairment is reversible. Amelioration of cognitive dysfunction may be facilitated during benzodiazepine tapering by add-on melatonin due to its anti-inflammatory and neuroprotective properties. We examined how melatonin and benzodiazepine withdrawal affect cognition, subjective well-being, and psychosocial functioning. Eighty patients with schizophrenia or bipolar disorder were randomized to add-on treatment once daily with either prolonged-release melatonin or placebo in a 24-week, double-blind clinical trial. All participants gradually tapered usual benzodiazepine dosage in a closely monitored treatment setting. We used the Brief Assessment of Cognition in Schizophrenia (BACS) to assess neurocognitive performance with additional assessments of subjective well-being and psychosocial functioning. BACS composite and subscale scores (except motor speed) significantly improved in parallel with benzodiazepine dose reduction, but there was no additional effect of melatonin. Cognitive performance was still markedly impaired post-tapering compared with normative data. Neither benzodiazepine withdrawal nor treatment group affected subjective well-being or psychosocial functioning. In conclusion, add-on melatonin does not seem to affect cognition, well-being, or psychosocial functioning in patients with severe mental illness. The observed improvement in cognitive performance could not be distinguished from retest effects, which may in turn have been facilitated by the benzodiazepine tapering.