The study of sandstone dilation characteristics under actual mining and excavation conditions promotes the safe and efficient development of underground engineering. Accordingly, this study employs true-triaxial testing to reveal the influence of intermediate principal stress and unloading action in the minimum principal stress directions on rock dilation. In the stress–strain analysis, with increasing intermediate principal stress, the maximum compression of the sandstone volume in the loading and unloading tests increases, while the onset of dilation is delayed under loading conditions and initially delayed and then accelerated under unloading conditions. The energy storage limit of sandstone under the unloading test tends to decrease with increasing intermediate principal stress, contrary to the results of the loading test, and the characteristic point at which the percentage of dissipative energy is greater than that of elastic energy occurs earlier. The energy of sandstone in the unloading test in the intermediate principal stress direction was smaller than that in the minimum principal stress direction, while the loading test showed the opposite trend. Combining these two analyses can elucidate the restraining effect and tensile stress effect of the intermediate principal stress, as well as the weakening and strengthening effects of the unloading action on the two effects. By further combining the average elastic energy and dissipative energy conversion rate under different test conditions, the weakening effect was manifested by shortening the compressive deformation course, and the strengthening effect was manifested by developing the degree of plastic expansion deformation. This study provides important guidance for deep mining projects.