(1) Whenever an accused person is found to be of unsound mind and incapable of making his defence, the Magistrate or Court, as the case may be, whether the case is one in which bail may be taken or not, may release him on sufficient security being given that he shall be properly taken care of and shall be prevented from doing injury to himself...