Below is copied from gove website, hope it helps.
A. You can only open an ISA if you are resident and ordinarily resident in the UK for tax purposes (ask your Tax Office if you are in any doubt about this).
Crown employees, such as diplomats or members of the armed forces, who are working overseas and paid by the government are eligible to open an ISA. Their spouses or civil partners can also open an ISA.
If you start an ISA in the UK and then go abroad, you cannot continue putting money into the ISA (unless you are a Crown employee working overseas or the spouse or civil partner of a Crown employee working overseas). However, you can keep your ISA and you will still get tax relief on investments held in the ISA. When you return, you can start putting money in again (subject to the normal annual limits).