Under current law, servicemembers can choose to keep their original residency as they relocate.
Spouses who lobbied for the change said having that same right would prevent hassles associated with every move, such as obtaining a new driver's license and reregistering to vote. In some cases, it also eliminates the need for couples to file separate tax returns and lowers the income taxes that some spouses pay.
Moving is a ritual repeated nearly every three years on average for military families.
The House passed the legislation on a voice vote. Rep. John Carter, R-Texas, a bill sponsor who represents Fort Hood, said it would give "invaluable relief to numerous military spouses who regularly uproot their entire lives to accommodate our Armed Forces."
Carter said in a statement that he expects Obama to sign the legislation into law in the next few days.
The Congressional Budget Office estimated that the bill's financial impact would be minimal.