Rashi explains (translation from chabad.org) based on the Gemora in Chullin:
He arranged them in the form of a drainpipe around his head because he
feared the wild beasts. They [the stones] started quarreling with one
another. One said, “Let the righteous man lay his head on me,” and
another one said, “Let him lay [his head] on me.” Immediately, the
Holy One, blessed be He, made them into one stone. This is why it is
stated (verse 18):“and he took the stone [in the singular] that he had
placed at his head.” [From Chullin 91b]
However, others (Ibin Ezra, Radak, Ralbag, Zohar Chadosh 27b and see Tosfos to Chullin 91b) note that there is no contradiction at all. 28:11 states "מאבני" - "of the stones" and not "אבני" - "stones", and could therefore be explained that he took one of the stones that were there.