Prison officers acted unlawfully in restraining inmate who later died