Found this on the British Academy website:
Anyone, of whatever nationality, who has obtained a doctorate from a UK university (within the terms of the eligible time period specified above), is eligible regardless of whether or not they are currently resident in the UK. Non-EEA nationals will be required to indicate on the application form if they expect to require a work permit in order to hold paid employment in the UK, but the need to hold such a permit is not a barrier to award.
EEA nationals who did not obtain a doctorate from a UK university are eligible.
And this on the ESRC postdoc fellowships FAQ:
The fellow will be employed directly by the host organisation rather than the ESRC so you will have to check with the employing organisation about their employment policies. However, the Postdoctoral Fellowship Scheme is open to qualified individuals from any country as long as they have the appropriate work permits and rights to residency as specified by the Home Office at the commencement of an award.
Hope this helps!