Sean Dyche says it was the right time to leave Everton amid “one of its toughest periods in its history”.