If your hydrangeas are wilting it can often be the result of too much sun and not enough water. Check the moisture level in the soil either using your fingers or a soil moisture meter, if the soil feels dry a few inches down then give the hydrangea a good deep water.
It may be a case that your hydrangea is planted in full sun rather than the partial shade that it wants to thrive in. Excess sun and heat can cause the plant to quickly lose water and start wilting.
There are hydrangea diseases that can cause foliage to wilt, including bacterial wilt that can start showing as wilting leaves and flowers before spreading quickly through the shrub. Unfortunately there is no cure for bacterial wilt and affected hydrangea are best removed and destroyed.