According to SIDS:
"As long as the mattress was covered in PVC and was in good condition, no sagging or rips in the plastic, it was fine. Just give it a good clean."
The scientific case for it is here:
https://www.sidsandkids.org/documents/SecondhandmattressesInformationStatement.pdf
In summary:
"Although there is some evidence to show that there is a higher incidence of SIDS on some second hand mattresses, it is not known what condition these mattresses were in or what position these babies slept in. There is no evidence to show that the risk of SIDS increases for babies who sleep on their back and on a firm, clean, well fitting mattress that is in good condition."
FSIDS website:
"Ideally you should buy a new mattress. If you are not able to do this, use the one you have, as long as it was made with a completely waterproof cover and has no tears, cracks or holes. Clean and dry it thoroughly. Check that the mattress is in good condition; is firm, not soft; fits the cot without any gaps; and doesn’t sag. It is very important that your baby’s mattress is kept clean and dry".
So I guess take a view of the condition of the mattress and go from there. As a worrier, I would probably replace it - but having done some quick research I am not convinced it's necessary if the mattress and cot are within the same non smoking family.
HTH you make your mind up either way!!
xx