Are 10 days in Sri Lanka enough for the beach?

Yes, 10 days in Sri Lanka is plenty for a serious beach holiday, honestly. A 10-day itinerary lets you explore the southern or eastern coastline at a calmer pace, without rushing or feeling stressed.
If your main aim is rest, you can easily divide your time between two or three seaside towns, like Mirissa, Unawatuna, and Hiriketiya in the south, or Arugam Bay and Trincomalee in the east. For more time on the shore, fly into Colombo and go straight to whichever coast you have chosen. Try not to stretch too far by weaving in extra inland cultural stops, unless beaches are secondary, as the travel fatigue will catch up with you.