As soon as he took office, he repealed Carter's budget and block granted mental health coverage to the states. He was promptly shot by an untreated schizophrenic, not directly related but indicative of the problems related to poor mental health facilities. The legacy of his funding changes was a dramatic increase in the mentally ill homeless population.
Quite the contrary. The push to deinstitutionalize the mentally ill took off in the 1960s at the behest of those in the mental health profession. The consensus was that new medications and local treatment could replace traditional institutionalization at a lower cost with greater success. It didn't, as many in the profession came to realize years later.
There was also a series of state laws and federal/state court cases beginning in the 1960s that made involuntary commitment much more difficult. Additionally they limited the amount of time that many patients could be held against their will in such circumstances. These actions, too, also had the support of the psychiatric profession.
To argue that mass deinstitutionalization of the crazies was a Reagan phenomenon is to ignore the preceding two decades in which most of it happened.