I have heard that it's inadvisable for the following reason. Inmates are much more likely to file a complaint against you to the board.
The patient pool has a large concentration of drug abusers who have no scruples at using you to get drugs. For instance, the prisoner may try to blackmail you to write them a Rx for narcotics and if you don't they'll make up some story and file a complaint against you to the board. Since they have plenty of time on their hands, and it costs them nothing, they will lodge complaints all the time. Is it worth the risk to your license trying to prove to the board that their claims are false and just a manifestation of manipulation?