If I were to rank the attributes that changed him the most, it would be:
1. Confidence
2. Diet
3. Skills
he used to be depressed about playing the same era as Federer / Nadal but he realized late last year that he can beat these guys, and has rarely set a foot wrong since. The diet helped build his stamina, but most of the games this year stamina hasn't played a part (I would say the final in Miami was an exception).
he always had the skills - before this streak he was able to beat Nadal and Federer. I think it just came down to being confident enough to knowing he can do it all the time. He is also tactically the most brilliant player I have ever seen, but that has always been the case as well.
While this blog post is well written and has a good point, I have seen several interviews with him and for some reason, every time the reporter quizzes him on the effects his new Diet/Fitness have had on his tennis, he is very quick to change the direction of the interview to his actual play. It is either something personal (perhaps change of diet does not give much street cred) or some PR person telling him, however it is quite obvious that he is trying to direct the public opinion........I have no basis for this, however it almost feels like his nutritionist was doing a bunch of interviews taking all the credit and when everyone started asking him for comment he feels compelled to take the credit back.
An explanation could be that it is not a good idea for sportsmen to say that they improved rapidly after a diet change. It is very easy to get associated with a rumor of being 'liberal' in diet choice, but almost impossible to get rid of it.
Because of that, diet, although an essential part of one's preparations, is best avoided as an interview subject.