The estimation of the mean density of random closed sets in R d with integer Hausdorff dimension n < d is a problem of interest from both a theoretical and an applicative point of view. In literature different kinds of estimators are available, mostly for the homogeneous case. Recently the non homogeneous case has been faced by the authors; more precisely, two different kinds of estimators, asymptotically unbiased and weakly consistent, have been proposed: in [9] a kernel-type estimator generalizing the well-known kernel density estimator for random variables, and in [29] an estimator based on the notion of Minkowski content of a set. The study of the optimal bandwidth of the "Minkowski content"-based estimator has been left as an open problem in [29, Section 6] and in [30, Remark 14], and only partially solved in [9, Section 4], where a formula is available in the particular case of homogeneous Boolean models. We give here a solution of such an open problem, by providing explicit formulas for the optimal bandwidth for quite general random closed sets (i.e. not necessarily Boolean models or homogeneous germ-grain models). We also discuss a series of relevant examples and corresponding numerical experiments to validate our theoretical results.