You should definitely mention this in the paper. There is a conflict-of-interest concern here so that you should be as transparent as possible. This arrangement is very common with pharmaceutical manufacturers and academic research.
Whether you do it in the acknowledgement or within the methods is really up to you, I'd probably put it within the materials and methods, as part of the ordinary recognition of where materials come from. E.g.:
Basket-weaving materials (straw, Intl Straw Corp, Des Moines, IA, USA; wool, Sheeps Down Under, Wagga Wagga, NSW, Australia) were donated by the manufacturers.
In addition, you may want to outline the scope of the conflict in a separate disclosure section, and note that while materials were provided for free the companies involved had no input on the design, execution, or presentation of the results, assuming that's all true. Remember, "conflict of interest" doesn't mean your work is corrupted, it just means that interests conflict, and the best way to defuse any perceived issues is to be transparent.
You may also want to address whether this was an appropriate use of the materials from the perspective of the manufacturers. Presumably they expected you were going to use the materials to decide whether to purchase more: they're providing them as a sales tactic. Instead, you've created a product (research paper) out of the freely given materials, and that product could reflect positively or negatively on the people providing you materials. As you can imagine, someone could be quite upset if you've used their free gift to explain to everyone that their product is inferior to their competitors. If you've signed any agreement about the transfer of materials I'd first check whether that agreement has any statements about how the materials can and can't be used, and if it's unclear or unstated, it's probably worth reaching out for permission, or just asking to pay for the value of the samples if that's feasible. Jon Custer recommends in a comment to consult with your institution's legal team and I think that's a very good idea.