With the monthly gains, the Dow posted its sixth-consecutive month of gains and the S&P 500 and Nasdaq logged their seventh-straight month in positive territory. And so far in 2013, all three major averages have surged nearly 15 percent each.
(Read More: Cramer: Here Are Two Stocks I Sold)
For the month, cyclical sectors including financials, industrials and techs were the best performers, while defensive sectors utilities, telecoms, and consumer staples ended in the red.
On the economic front, consumer sentiment hit its highest level in nearly six years in May, rising to 84.5 from 76.4 in April, according to the Thomson Reuters/University of Michigan's final reading on the overall index. And business activity in the Midwest rose in May, rebounding after a contraction in the month prior, according to the Institute for Supply Management-Chicago.
But consumer spending fell 0.2 percent in April for the first time in almost a year, according to the Commerce Department, disappointing economists who had expected a gain of 0.1 percent. And inflation pressures remained subdued, rising just 0.7 percent in the last 12 months, the smallest increase since October 2009.
The weak spending and the lack of inflation pressures could dampen market speculation the U.S. central bank might start scaling back monetary easing later this year.
"All eyes remain on the U.S., analyzing every piece of data to establish if, and when, stimulus measures will be withdrawn—with every piece of bad news being actively welcomed by the market," wrote Rebecca O'Keeffe, head of investment at Interactive Investor. "This inverted logic is unsustainable in the long term, but for the moment, as the withdrawal of liquidity is perceived as being more painful than an economic slowdown, investors are happy to live in this bubble for as long as they can."
(Read More: Rising Yields May Stifle Boom in Dividend Stocks)