The wealthy are flocking to the beach this summer—and so is their money.
Real estate sales in the Hamptons hit a record in the second quarter, according to a new report from brokerage firm Douglas Elliman and Miller Samuel, the appraisal and research firm. Sales for the quarter came to $1.145 billion, up 23 percent from last year's second quarter, which totaled $929.4 million.
The second-quarter total is the highest since Miller Samuel began tracking the Hamptons market in 2005, according to Jonathan Miller, the company's president and CEO.
"It was a surprisingly strong quarter," he said.
The average sale price in the Hamptons was $1.7 million—roughly flat with last year. But inventory is falling fast—declining 13 percent in the quarter. The average sale price in Sagaponack hit $11 million, making it among the most expensive areas in the country.
(Read more: Summer rentals hit $1 million in the Hamptons)
Brokers say there were several factors driving sales. First, Wall Street and the financial services industry is seeing strong profits and compensation, which traditionally drives the Hamptons market.
Stronger stock markets have also boosted the fortunes of non-Wall Street buyers and investors looking for a place to invest their cash.
(Read more: They're back! $100 million homes)
But Paul Brennan, a broker with Douglas Elliman in the Hamptons, said that many wealthy buyers pulled the trigger in the second quarter because of the sudden rise in interest rates, which also started driving up mortgage rates.
"They saw that spike and decided that it was time to get off the sidelines," he said. "They realized they might never have a better time to buy."
Among the big sales being talked about during the quarter was Steve Cohen's purchase of a $60 million oceanfront home in East Hampton. While the deal was expected to close in the second quarter, it wasn't recorded in time for the second-quarter sales tally, Miller said.
The big strength in the quarter came from what Hamptons brokers call "entry level" homes—those priced between $1 million and $5 million. These homes accounted for about 40 percent of the sales total.
—By CNBC's Robert Frank. Follow him on Twitter @robtfrank.