It's unclear from your question as to whether you are asking about terms of service in the US, or asking about terms of service in the UK (using the US as a parallel example)
When do you negotiate for this?
In either case you negotiate for it when you join the company. Theoretically you could negotiate for it any time the terms of your service up being reconsidered - for example if they were offering you an improved salary/benefits package for some reason. However it makes little sense if you have already been with the company a while - there is no point in offering you 5 years of deemed service if you already have 5 years of real service.
How popular is this?
In the US it's very rare, because companies don't usually owe more to a person with five years service more than a person with zero years service. "At will employment" means that companies mostly can fire someone for any or no reason, giving at most a few weeks notice (though it can vary by state). If you wish to guarantee yourself a minimum payout in the event of being laid off you would have to negotiate the terms specifically, not just "deemed to have five years service".
In both the US and the UK these terms are unusual except for key executive positions. It's unusual in the US for the above reasons, and in the UK because it's very expensive for the company in the event that you turn out not to be as good as they think, or even if they decide that your role is no longer necessary. However it may be worth asking if you will incur significant expenses by taking the job (such as having to relocate overseas at your own expense). Make sure you are not left tens of thousands of dollars out of pocket because you are let go from a job in the first few weeks.
You ask for this by asking for it - say that you want to be treated as if you had N years of service from day 1. I would advise consulting a lawyer to check any agreement, especially if you are negotiating an employment contract overseas.