Land ownership is one of the most contentious issues in the formerly junta-run country, where the army stands accused of rampantly confiscating land during its 50-year rule.
In recent years democratic reforms and the end of Western sanctions have fuelled a scramble for territory and brought a flurry of old conflicts to the fore.
The latest case revolves around 70 acres (28 hectares) of land, which 24 farmers say was seized from them by a military security unit in 2001 with little compensation.
For years the farmers continued to grow their crops undisturbed, but in August 2016 the military tried to fence off the area.
When the farmers protested last week they were all arrested, charged with trespassing and destroying property, and sent to Mandalay's notorious Obo Prison.
Sixteen of those detained were women, according to a family member, including one who was taken to jail along with her six-month-old baby.
Three of the 24 farmers were released earlier because they face different charges, their lawyer, San Nyunt Wai, said.
"All the (remaining) farmers were granted bail today," he told AFP, adding that they will next appear in court on January 17.
Most land seizures in Myanmar date from the 1990s and early 2000s, when the country was undergoing a messy transition from its own brand of junta-controlled socialism to a more market-driven model.
Activists say most of the land was grabbed by military officers and their cronies, and then large tracts of it were loaned to private companies to be cultivated.
A Global Witness report found that as of 2013, 5.3 million acres had been leased to investors for commercial agriculture, "the majority without the consent of its owners".
Few farmers have documents to prove they have any rights to the land. Those who do often end up mired in a complex and opaque system with little hope of redress.
A commission set up in 2013 to address land-grabs has only dealt with a tiny fraction of the tens of thousands of cases across the country.
The new elected government has said addressing land conflicts is a priority but has done little since it came to power in March.
Legal rights group Namati said those rare farmers who win compensation often only receive a tenth of what the land is worth.