First of all, if most of your data is missing, you are in trouble anyway. You need to ask why is most of the data missing, and also, why are the data you observed not missing. Being missing is very likely telling you something in your data.
All methods of correcting missing data, including the naive interpolation, mean replacement, and median replacement methods, assume that you can largely ignore the reason for the data being missing - These are the Missing at Random [MAR], and the (much stronger) Missing Completely at Random [MCAR], assumptions.
If one, or both, of these are not true, which is very likely if most of your data are missing, then no asymptotically reliable method of imputation is known to exist. This doesn't mean you can do nothing - see here for some suggestions.
In most circumstances, with MAR data, people use model based methods. Essentially these impute a dataset many times, filling in the missing values using plausible models of the missing data, and then run analyses on the ensemble of imputed datasets.
I've usually used the mice package in r.
A paper is here.
A useful webpage is at web.maths.unsw.edu.au/~dwarton/missingDataLab.html.
If the process which leads to your missing data is not ignorable, in other words, if being missing tells you something, none of this will work. It will produce nice looking numbers, but no-one, you included, will have any idea what they mean.