Television footage showed women screaming as they were pushed into a fence by the crowd outside a house in Pasuruan.
Most of the dead were women, Budi, a worker at the morgue, said.
“They died because of a lack of oxygen or were trampled to death after being pushed from behind in the crush,” he said.
Aminurahman, the town’s mayor, said there were at least 2,500 people in the alley when the stampede began for unknown reasons.
“It’s an annual activity from that family but there were a lot more people lining up today than in previous years,” he told a local radio station.
“There was no co-ordination with police during the handout.”
Cash handouts are commonly favoured by wealthy Indonesians during Ramadan, when most of Indonesia’s 235 million people fast during daylight hours.
But crowd control is problematic and deaths have occurred at similar events in the past.