Teams switch ends after each period. In the 1st and 3rd, a team defends the end nearest its bench; in the 2nd period (and regular-season overtime) it defends the far end, so tired players have a longer skate to change. That makes it harder to get fresh legs on in the 2nd, and it's a common explanation for why 2nd periods can get more chaotic. It's also the name of our monthly post on travel and rest.
Hockey basics
The long change
In the 2nd period, each team defends the end farther from its own bench, so changes take longer.