A regular hexagon has 6 equal sides and 6 equal angles.
To rotate the Octagon onto itself, we have to rotate each of those sides to an adjacent side. This happens when the angle of turn is th of a full-circle turn.
A circle has and
A 60° rotation clockwise or counterclockwise puts each of the edges over the position where an adjacent edge was located.