While I could point to Yoda's statements in AOTC ("Impossible to see, the future is" and "The Dark Side clouds everything") as a possible explanation for the relative lack of foresight into the Clone betrayal/Order 66 massacre(s), my opinion is much less connected to SW and more to human nature itself.
I think that the Jedi didn't sense the Clone betrayal in a concrete way (e.g. the betrayal by the Clones themselves) because the Clones did not exhibit any signs of that even being an issue. Mace was so busy worrying about Chancellor Palpatine near the end of the Clone Wars (the veiled threat), he never thought to consider the really obvious threat under his and the Jedi's collective noses. The Clones were allegedly commissioned by a Jedi and were programmed to regard the Jedi as their generals and commanders. Why would they even be suspected of such an action?
The Clones didn't realize they were going to betray the Jedi nor did they realize that they were nothing more than pawns in Palpatine's political schemes: in their minds, they were soldiers and the Jedi were their commanders. However, in the depths of their consciousness, a clandestine thought had been implanted (by the Kaminoans or by Dooku or Palpatine or unknown covert agents) that went by the name of Order 66. I've always looked at Order 66 as not so much a rule that the Clones were taught, but as sort of a post-hypnotic suggestion on a genetic level that the Clones were not aware of. A good example of this would be on (I think) the second season of "Alias" where the idea of "sleeper agents" was explored.
Since the Clones had no knowledge that they would betray the Jedi, the Jedi did not sense their betrayal in any way. If you notice, Cody was very friendly and exhibited no behavior that would imply he had ever been trained to kill Obi-Wan until the moment that Palpatine contacted him with "Execute Order Sixty-Six." At that moment, he does what he was programmed to do without his knowledge, as do the rest of the Clone Army. The Jedi didn't sense it because until Palpatine flipped the switch in the Clones' heads, there was nothing to sense.
And how did Yoda sense it, while the others didn't? My idea on that has to do with the structure of that sequence as a whole. Each Jedi is shown being gunned down in some way, shape, or form by their Clone Troopers, except Yoda. The first shot of Yoda we get in the Order 66 montage is of him feeling an intense disturbance in the Force and dropping his cane. So, by being so innately connected to the Force itself (and by Palpatine not contacting Gree on Kashyyyk first), he knew that something serious was wrong and had time to prepare. The fact that Gree and the Scout Trooper actually walked over to Yoda rather than simply firing on him, giving them a moment to create intent in their own consciousness, allowed Yoda all the time he needed to defuse the situation before it began.
So, there you go. Hope that made sense to someone else besides me.