eileen, they make something easier to use. But first, ask yourself where the water is coming from. It is probably condensation and it gets there the same way water forms on the outside of a glass of iced tea--or whatever cold drink you like. The water doesn't come through the glass, it comes out of the humidity in the air and deposits on the cold glass.
The way to stop this from happening is to remove the cold surface, in this case, the cold pipes. You do this by covering them up with foam insulation that you get at very moderate cost from your home center. The problem with a spray would be that you would have to get all the pipe with the spray and "misses" with the spray can and overspray that got on your floor would be a really big mess.
The molded foam insulation comes in 2 sizes and in long lengths that are split to make installation easy. You can cut the foam to length with strong scissors or a sharp knife. Measure what size pipes you need to cover and the people at your store can make sure that you get the right size. Pipe comes in sizes that are called by their inside diameter but tell them that the size you are giving them is the actual outside dimension, if that's what it is. Most water pipes in houses now are copper tubing and that goes by actual outside diameter. Usually, you would have a mix of 1/2" and 3/4". You might consider doing the hot water pipes too. The insulation keeps the water hotter on the way to your shower, sink or washer.