The most popular explanation is scent.
Clothing strongly retains the owner’s smell, giving the dog a sense of security and companionship. By lying on these items, the dog feels close to the person it loves. For this reason, dogs often favor unwashed clothes, since they bring a stronger trace of body odor.