We have studied the structural and electronic phase diagrams of CeFeAsO1-xFx and SmFeAsO1-xFx by a detailed analysis of muon spin relaxation experiments, synchrotron X-ray diffraction, M̈ossbauer spectroscopy, electrical resistivity, specific heat, and magnetic susceptibility measurements (Full abstract in the main document).