According to pewresearch.org, it's estimated that there were "… 2,162,400 inmates who were in prison or jail at the end of 2016." Obviously, with numbers such as that, it is tempting for Federal, State, and local jurisdictions to want to take advantage of the sheer numbers of those incarcerated, for the greater benefit of those not so incarcerated. This signifies that one of the tempting things to do, when human beings are behind bars, is to desire to perform various medical experiments upon them, since as a captive audience, it is therefore quite tempting to see the prison population as a desirable base of people to medically experiment upon, especially since, those that are incarcerated, are often viewed by those that are not, as being somewhat expendable, in addition to the fact, that many believe those incarcerated should at a minimum try to provide some sort of benefit or greater good to those that are not.
The thing about medical experiments is that the nature of the experiment itself, pretty much defines its morality or immorality of such an act. That is to say, if a prisoner is suffering from some sort of cancer, and there is a new drug that is supposed to be or could be beneficial for that particular form of cancer, and the incarcerated person is fully informed of the side effects of such and the salient fact that the drug or procedure is in the experimental stage, then such medical treatment is probably morally fine, if the information so provided is valid and fully disclosed. If, on the other hand, prisoners are subject to medical procedures in which their consent has never been given, or have been tricked into ingesting substances that could be harmful to them, under the misdirection of medical personnel that have not informed those that are incarcerated that they are being deliberately utilized as "guinea pigs" or similar, then this is clearly wrong.
That said, when it comes to freely consenting to medical experimentation, it is fundamentally important to recognize that those that are incarcerated and give consent, or not under the same trials and tribulations as those that are free to be about their business, in the natural world of non-incarceration. That is to say, those are truly free and clearly give their consent or not to medical experiments, have, in most instances, freely chosen to do or to not do so, though even these people may have been coerced, in one form or another, to give such consent. On the other hand, the over two million peoples that are incarcerated are living within an environment of which they do not control or even have a voice within that environment, so then, whether enticed or threatened, it is not inconceivable to believe that those that are subject to the arbitrary and punitive rules within a prison, which includes food restrictions, exercise restrictions, and solitary confinement, along with all the other extrajudicial punishments permitted and conducted, away from those monitoring such, that any incarcerated person can actually truly give their free consent to medical experimentation, for they may be reasonably fearful that real punishment, retaliation, or denials will be their fate, if they do not.
So then, as much as the medical and pharmaceutical professions may strongly desire to see the prison population as being the perfect population of people to experiment upon, since their professional reputation is hardly at stake, this is a form of cruel and unusual punishment of those so incarcerated; and no medical experimentation upon prisoners, can and should ever be conducted, unless such prisoner is already suffering from a specific medical problem in which that individual prisoner assents to such experimentation of a relevant peer reviewed procedure.