Potatoes do prefer to grow in acidic soil and coffee grounds are acidic and can help with growing potatoes when mixed in with the soil.
It's best to make a fertilizer with mulch and mix in the coffee grounds with your mulch and it makes a great combination for fertilizing the potatoes and other plants that prefer acidic soil.