Generally speaking, for state tax purposes, your spouse’s state of residence is the same as it was before incarceration.
Also, consider if this info below might be helpful to you:
There are many issues when filing a tax return if your spouse is incarcerated. The IRS considers you to be still married even when one spouse is incarcerated. You can choose to file as “Married filing jointly” or “Married filing separately.” The filing status you choose will determine your eligibility for some tax breaks and credits that can increase your refund or decrease the amount you owe.
According to the Internal Revenue Service, if you and your spouse didn't reside together at any time during the last six months, you may be eligible to file “Head of Household.” So, if your spouse has been in prison for more than six months and you have a qualifying child, you may be eligible to file “Head of Household” and claim the Earned Income tax credit. This refundable credit can add several hundreds, maybe even thousands, of dollars to your refund. Filing "Head of Household" also means that you will be solely responsible for any taxes owed or receive any refund due.