Absent anything in an agreement or divorce decree requiring that you surrender the policy or change ownership, or name a specific beneficiary, if you own the policy, you can maintain the policy.
Insurable interest is only necessary at the time that the policy is issued -- once it issues, you have the right to maintain the policy.
I doubt that ANY sane insurance company would be eager to issue a new life insurance policy on a person while he or she is in prison.
If an ex does not like the thought of his ex having a policy on his life (so that you benefit if he dies - bad karma?) he should have arranged for a change of ownership or surrender at the time of the divorce.
If the policy is large enough, and his health or life expenctancy is impaired, then you may be able to sell the policy to a viatical or life settlement broker.