Olympic champion swimmer Adam Peaty says taking a break from the sport is just as important for his mental health as his physical health.