Mean imputation is always tricky, because it (often) implies single imputation (== replacing each missing value only once). In this short paper on imputation in biomedical research I find the explanation of why single imputation is not considered appropriate, quite adequate:
"Simple imputationmethods (eg,LOCF,complete case analysis,mean value
imputation, and random imputation) are considered “naive” because they
fail to account for the uncertainty in imputing missing values, do not
use information available in observed values, can introduce bias, and
artificially increase precision."
For any imputation method however, also consider thinking about the missing data mechanism. This might give you a hint what to do, and/or what bias to expect (see the reference for some pointers).
In the general case of missing data, you might consider using multiple imputation as proposed by Rubin in 1987. There is more than one way to actually perform this technique, when looking at the model used to find replacement values. In your case, you could consider using multilevel models to account for time trends, or only using the lag and lead measurements of a missing value (both with their pros and cons). All should have less methodological issues than mean imputation.
In conclusion to your question, IMO mean imputation is not okay.