Ultrasonic measurements have been carried out to investigate the critical dynamics of structural and superconducting transitions due to degenerate orbital bands in iron pnictide compounds with the formula Ba(Fe$_{1-x}$Co$_x$)$_2$As$_2$. The attenuation coefficient $alpha_{mathrm{L}[110]}$ of the longitudinal ultrasonic wave for $(C_{11}+C_{12}+2C_{66})/2$ for $x = 0.036$ reveals the critical slowing down of the relaxation time around the structural transition at $T_mathrm{s} = 65$ K, which is caused by ferro-type ordering of the quadrupole $O_{x^2-y^2}$ coupled to the strain $varepsilon_{xy}$. The attenuation coefficient $alpha_{66}$ of the transverse ultrasonic wave for $C_{66}$ for $x = 0.071$ also exhibits the critical slowing down around the superconducting transition at $T_mathrm{SC} = 23$ K, which is caused by ferro-type ordering of the hexadecapole $H_z^alpha bigl( boldsymbol{r}_i, boldsymbol{r}_j bigr) = O_{xy}bigl( boldsymbol{r}_i bigr) O_{x^2 - y^2}bigl( boldsymbol{r}_j bigr) + O_{x^2 - y^2}bigl( boldsymbol{r}_i bigr) O_{xy}bigl( boldsymbol{r}_j bigr)$ of the bound two-electron state coupled to the rotation $omega_{xy}$. It is proposed that the hexadecapole ordering associated with the superconductivity brings about spontaneous rotation of the macroscopic superconducting state with respect to the host tetragonal lattice.