When Martin Rawls-Meehan started making adjustable beds in 2004, it was a foregone conclusion that key parts would be made overseas. It was cheaper to manufacture in Taiwan than in the United States, and from Taiwan it was easier to ship to customers in Asia.

But this year, Rawls-Meehan's company, Reverie, began making some beds in their entirety at a factory in New York.

"Shipping costs are tremendous," he said, soaring between 50 percent and 60 percent since the company was founded. "I could put that money into the manufacturing side in the U.S."

Reverie, based in Silver Creek, N.Y., is one of a growing number of small businesses chipping away at the decades-old trend of manufacturing overseas. They're reshoring - moving production back to U.S. factories as labor costs grow in countries such as China and India and shipping also becomes more expensive. In the last 20 years, the price of a barrel of oil has risen to about $95, from $20.

Other issues are encouraging the shift: Business owners are tired of having to wait weeks for slow-moving container ships and want to get products to their customers faster.

Since its start, Reverie has had the bases for its beds made in Taiwan. Rawls-Meehan and a business partner agreed that cost savings and proximity to a large Asian market were good reasons to manufacture there.

"The mentality was that products were going to be manufactured more cheaply in Asia than in the U.S.," Rawls-Meehan said.

But shipping costs have risen to as much as 20 percent of the wholesale cost of a bed made in Asia. In 2004, it was just 10 percent on some of Reverie's products.

So the company now makes a new line of upscale beds near Buffalo. Shipping costs account for no more than 5 percent of the wholesale price, offsetting higher labor costs.

Reshoring began picking up momentum in 2010, after the recession and as the dollar began to lose value, said Lisa Ellram, a professor at Miami University of Ohio specializing in supply-chain management.

Businesses "really just didn't have as much certainty about their volume and their needs, so it was maybe a little bit easier to deal with somebody closer," Ellram said.

The government doesn't have figures on how much manufacturing is coming back to the United States, said Jeannine Aversa, of the Bureau of Economic Analysis.

According to the Reshoring Initiative, a nonprofit advocacy group, about 50,000 manufacturing jobs came back between 2010 and 2012, many in factories that turn out electrical equipment and components and metal parts.

The trend could gain momentum because demand for U.S. goods is growing. Ninety-five percent of manufacturers surveyed last year said they were increasing their purchases from domestic companies, or keeping them at the same level as 2011, according to ThomasNet, which operates an online marketplace for businesses, manufacturers, distributors, and service companies.

Myriad problems helped Reading-based Reading Truck Body decide to bring truck-part manufacturing back to this country from China.

Shipments were disorganized. The company did not know until it opened containers which parts had been shipped, so it couldn't be sure ahead of time which truck bodies could be finished and sold, national sales director Craig Bonham said.

The company received its last shipment from Asia in December, Bonham said.

With production now entirely in the United States, he added, "we have more control of our destiny."