In 0-2-year-old brains, the T2-weighted (T2w) contrast between white matter (WM) and gray matter (GM) is weaker compared with that in adult brains and rapidly changes with age. This study aims to design variable-flip-angle (VFA) trains in 3D fast spin-echo sequence that adapt to the dynamically changing relaxation times to improve the contrast in the T2w images of the developing brains. T1 and T2 relaxation times in 0-2-year-old brains were measured, and several age groups were defined according to the age-dependent pattern of T2 values. Based on the static pseudo-steady-state theory and the extended phase graph algorithm, VFA trains were designed for each age group to maximize WM/GM contrast, constrained by the maximum specific absorption rate and overall signal intensity. The optimized VFA trains were compared with the default one used for adult brains based on the relative contrast between WM and GM. Dice coefficient was used to demonstrate the advantage of contrast-improved images as inputs for automatic tissue segmentation in infant brains. The 0-2-year-old pool was divided into groups of 0-8 months, 8-12 months, and 12-24 months. The optimal VFA trains were tested in each age group in comparison with the default sequence. Quantitative analyses demonstrated improved relative contrasts in infant and toddler brains by 1.5-2.3-fold at different ages. The Dice coefficient for contrast-optimized images was improved compared with default images (p < 0.001). An effective strategy was proposed to improve the 3D T2w contrast in 0-2-year-old brains.