Yeah, the ethics would be tough, but essentially to really do nutrition research, you MUST control the food intake. Control for age, weight, calories and activity, and vary only the dietary makeup to varying degrees, etc.
What sort of ethical issues are you thinking? I would have thought higher grade meals than you'd find in a standard prison would entice all the volunteers you could want. There's probably other groups were some good quality meals would be just as enticing, like college students.
A bigger practical issue in prisons would be things like the high prevalence of hepatitis and drug use along with all the confounding factors (like poverty) that lead them to end up in prison.