Relaxation of the isothermoremanent magnetization has been investigated in ceramic Y-Ba-Cu-0 samples with different grain sizes. it is found that the effective pinning energy U(eff) determined at different temperatures by using relaxation data of the remanent magnetic moment M(IR) and the relationship dlnM(IR)/dln t= -kT/U(eff) has a maximum at a value of the magnetizing field H0 corresponding to the most rapid increase of M(IR) with increasing H0. A phenomenological theory based on a critical-state model has been developed to describe these phenomena. The main conclusion of our analysis is that the dependence of U(eff) on H0 can be attributed to the evolution of the distribution of the trapped flux (as H0 is varied) without involving any assumptions about the dependence of the pinning barrier on the field.