I would imagine, though, that most lenders might restrict lending up to normal retirement age (currently 65).
You would still need to earn enough after retirement (assuming retirement age will still be 65) to fund the mortgage, so you'd need at least a decent pension.
Of course, retirement age might be raised to 70. In practice, though, would you still want to have a noose, er, mortgage right thru' your 60's ?
Believe it or not, I know someone who's 39 going on a mortgage for 35 years. The other person on the mortgage is 32. It's all been approved, so it is possible!