A method of reconstructing a stochastic realization, continuous or discrete, resulting from a random function representing a numerical model, can be representative of a porous heterogeneous medium such as an underground reservoir. It is based on identification, for a given realization, of a random function and of a set of random numbers allowing, from a given geostatistical simulator, to reconstruct the reference realization. The reconstruction techniques proposed are either general or specific to a type of geostatistical simulator. They concern the sphere of optimization, relaxation, filtering and sequential approaches. The reconstruction method allows to estimate a set of random numbers for regenerating the reference realization, this reference realization can then be locally or globally modified, by gradual deformation, so as to better reproduce newly acquired dynamic data (production data for example). The method is applicable notably to oil reservoir development for example.