I agree with those who point out that it takes brains to survive in a place with limited technology: in addition, if you don’t have access to a firm scientific model it can take a lot of brain power to filter the real phenomena (masked in ‘wisdom’, of course,) from the religious chaff.
Also, it is possible that selecting for better disease resistance can lower intelligence.