The accident happened near Foca district in the western province of Izmir.
The coast guard said all the migrants aboard were rescued.
“The migrants include 13 Afghans, eight Syrians, six Angolans, six Sierra Leoneans, three Eritreans, two Malians, one Iraqi, one Somali and one Comorian,’’ the local media said.
It added that they were believed to have tried to sneak into a Greek island.
The Aegean Sea was a favoured route for illegal migrants seeking to reach European countries via Turkey, but a deal signed between Turkey and the EU in March 2016, has reduced the flow of illegal migration through this route.
The Turkish coast guard data suggested that the number of illegal migrants via Turkey was 21,937 in 2017, down from over 37,000 in 2016.