It surely depends on the type of imprisonment. Hard to see why it wouldn't work with chains, hard to see how it would work with hedge prison or burial. I'd rule based on whether you can be in range of the target, and whether you can get the fingernail clippings etc. One edge case would be the gem prison, if you already had the clippings and were possessed of the gem. Does the imprisoned figure count as being in range? I'd say no, touching the gem doesn't count as touching the target.If a wizard found an imprisoned creature (aka the spell). Could they use that creature as the target for simulacrum?
How about if they were under sequester?