Woke up in the hospital and was tied up by security guards. Are their actions legal?

It is illegal to wake up in the hospital and be tied up by security guards.

Hospitals are institutions that treat and care for patients, and also do health checks and disease prevention. It is a medical institution in which the staff of the hospital carry out professional division of labor through medical examination, inspection, treatment and other equipment, and provide medical and convalescent services.