Yes, the sentence "birds hidden in nests from fear of cold" is grammatically correct. However, it would be more precise to say "Birds hide in nests out of fear of the cold." This sentence conveys that birds seek shelter in nests due to their instinctual fear or dislike of low temperatures.