Weigh the samples before you put them in the water, and again afterwards

Yes, this would work. The increase in weight for each sample would be the water it has absorbed.

The only problem might be that the water might leak out of the sample onto the scales. The water would still be weighed, but might make things a bit wet!

You could also measure the volume of water in the container before and after.

How would you make sure it's a fair test?