It's actually quite difficult to overpay National Insurance. For example, if you're weekly paid and get paid £500 in the first week of a tax year, you'll pay PAYE under a system that effectively assumes that you'll earn a total of £26000 in that tax year. If you subsequently don't earn a single penny more during that tax year (perhaps because you're in hospital) you'll have paid unnecessary tax and be entitled to a refund.
However, unlike Income Tax, National Insurance is paid on a week-by-week basis, so you'll have still paid the correct amount for that single week and thus won't be entitled to any refund.
However, if you think that you might be eligible for a NI refund, start here:
https://www.gov.uk/claim-national-insurance-refund