That is not a question anyone outside your relationship can answer for you, and anyone who tells you otherwise is not being straight with you.
You know this person. You know whether his words have matched his actions before. You know whether this is the first time you are hearing something like this or the third. You know what his track record looks like when things were easy, before consequences arrived and made honesty feel like the smarter play.
Prison changes some people genuinely. The forced stillness, the time to think, the distance from whatever environment enabled the behavior, those conditions have led real people to real reflection. That is true. It is also true that incarceration creates powerful incentives to say whatever keeps support systems intact on the outside. Both things exist, and only you are positioned to read which one is happening here.
The question worth sitting with is not whether he means it right now. It is whether the patterns that led to the cheating have actually been examined and addressed, or whether what you are hearing is pain and regret talking. Meaning it in the moment and having done the work are two different things.
You are the only jury that matters on this one. Trust what you already know about him, not just what you want to be true.