BARN : FARM :: mattress : bed
The best answer is mattress. The relationship between the first pair of words, BARN and FARM, is that of part to whole—one word is a part or piece of the other. Therefore, the second pair of words must also have a part-to-whole relationship. A mattress is part of a bed.