The court in Nador, a northeastern town near the border with Melilla, "increased on Monday evening the sentences of three migrants to four years in prison, and three years for five others", lawyer Mbarek Bouirig said.
The charges against them include illegal entry to Morocco, "disobedience" and "damaging public property", he told AFP.
The three defendants given a four-year term had initially been sentenced to three years behind bars, and the five others to two and a half years.
The appeals court upheld the two-and-a-half-year sentences of seven more defendants in the same case, Bouirig said.
Bouirig had called on the judiciary to reduce their sentences, urging "consideration of their status as asylum seekers."
Moroccan authorities said 23 undocumented migrants died in the June incident, the worst death toll in years of such attempted crossings.
The Moroccan Association for Human Rights put the number of dead at 27, while Amnesty International said at least 37 people lost their lives.
According to the authorities, 140 Moroccan police officers were injured.
Morocco has since handed dozens of migrants sentences of up to four years' imprisonment, with many receiving harsher sentences upon appeal..
Melilla and its sister enclave of Ceuta have long been a magnet for those desperate to escape grinding poverty and hunger.
Both Morocco and Spain have insisted the migrants were to blame for the tragedy, with Rabat saying some died after falling while trying to scramble over the fence, while others suffocated as people panicked and a stampede started.