In his famous 1872 book "Русская история в жизнеописаниях ее главнейших деятелей" ("Russian history in the biographies of its main actors") Nikolay Kostomarov writes (rough translation):
We still don't know how the relation between the Tsar Aleksey Mikhailovich and Nikon, who the tsar previously considered his best friend, cooled down. In 1656 Nikon was still powerful and it was his influence that caused the infamous war against Sweden. In 1657 the relation between the tsar and the patriarch was also still a good one it seems. [...] But later Nikon's enemies, the Boyars, started winning influence over Aleksey Mikhailovich: Streshnev, Nikita Odoevskiy, Trubetskoy and others. Boyars, it seems, found the tsar's weak spot and showed him that he no longer is the only ruler of the country. [...] The tsar didn't quarrel with Nikon but he simply started withdrawing himself.
Kostomarov then describes in great length the first open confrontation between Nikon and the tsar in 1658 that caused Nikon to abandon his post.