Seclusion was anything but a last resort, he said: "they seclude because it's easy".
The five defendants - the Attorney-General, the District Inspector, the Mental Health Tribunal and Waitemata DHB and Capital & Coast DHB - all deny the claims and will present their case later in the hearing.
The men all have intellectual disability issues, and two are autistic.
They were all committed as special patients after coming before the courts on violence charges around 15 years ago, when they were found unfit to plead.
Two of the men remain in secure care, with another living in a residential rehabilitation service home.
The legal action was arranged with the help of their litigation guardian, Colin Burgering, who works for the Justice Action Group.
A litigation guardian is authorised to conduct proceedings in the name of, or on behalf of, an incapacitated person or minor.
Routine inspections interfered with personal privacy, the men's claim states. One of the men's property was allegedly removed from his room after which staff said he could "earn" back items for good behaviour.
Over-medication as a use of restraint or punishment, and denial of contact with family and others including advocates is also alleged.
The sum of this treatment was that the men were "warehoused", Ellis said.
"They were put in these institutions as if they were a parcel put on a shelf.
"The rights of the intellectually disabled are rarely, if ever, litigated ... this case becomes important because of that."
The case before Justice Rebecca Ellis is set to take six weeks.