It IS a crime. NY State Penal Law states that a person committed to the care and custody of a correctional facility is incapable of consent. Any employee who has sex with an inmate, even if "consensual" can be charged with rape.
Article 130 - NY Penal Law
S 130.05 Sex offenses; lack of consent.
1. Whether or not specifically stated, it is an element of every
offense defined in this article that the sexual act was committed
without consent of the victim.
3.
A person is deemed incapable of consent when he or she is:
(a) less than seventeen years old; or
(b) mentally disabled; or
(c) mentally incapacitated; or
(d) physically helpless; or
(e)
committed to the care and custody or supervision of the state
department of corrections and community supervision or a hospital, as such term is defined in subdivision two of section four hundred of the
correction law,
and the actor is an employee who knows or reasonably should know that such person is committed to the care and custody or supervision of such department or hospital. For purposes of this paragraph, "employee" means (i) an employee of the state department of corrections and community supervision who, as part of his or her employment, performs duties: (A) in a state correctional facility in which the victim is confined at the time of the offense consisting of providing custody, medical or mental health services, counseling services, educational programs, vocational training, institutional
parole services or direct supervision to inmates;
http://ypdcrime.com/penal.law/article130.htm#p130.05