In perusing the book, The Medieval Prison: A Social History, I came across the following:
“Largely as a response to their persecution under the Romans, early Christian apologists developed a basic imaginary of the prison. Martyrological narratives set in and around Roman jails introduced literary “sweet inversion” of despair into hope, of physical suffering into spiritual empowerment, and of secular coercion into divine grace. In this way, theodicy helped disseminate incarceration as a leitmotif of Christian spirituality, first among ascetics and later in monastic circles. As we shall see, self-imposed incarceration became a common metaphor for the angelic life and soon assumed purgatorial qualities...
“The Martyrological literature conveying the experiences of Christian confessors presents the prison as a place of personal trial and eschatological triumph, and incarceration as a process of spiritual growth, potentially culminating in revelation. Thus, rather than precipitating apostasy, the harsh conditions of the Roman jail accelerated religious perfection: a classic “sweet inversion.” In the emphatic words that Prudentius (348-405?) attributed to Fructuosus, the martyred bishop of Tarragona (d. 259),
"Prison to the Christian faithful is the path to glory,
Prison propels to the heavens’ summit,
Prison unites God with the blessed."
“As a new locus of holiness, the prison attracted substantial attention from early Christians, whether laymen or clergy…
“In the words of Tertullian (140-230): “The prison serves the Christian as the desert served the prophet…Even if the body is confined, even if the flesh is detained, everything is open to the spirit.”
“By comparing the prison with the desert, Tertullian linked Christian asceticism with the formative experiences of the Israelites and Christ’s spiritual training….The metaphor subsequently found its way into monastic spirituality, which spawned a distinct new strand of carceral language. Thus, according to the Desert Mother Syncletica (d. ca. 400),
"In the world, if we commit an offence, even an involuntary one, we are thrown into prison; let us likewise cast ourselves into prison because of our sins, so that voluntary remembrance may anticipate the punishment that is to come.”
Geltner, G. (2008). The medieval prison: A social history. Princeton: Princeton University Press. (pp. 83-85)