The bodies were spotted by the train driver near the village of Fylakio, which lies between the cities of Alexandroupolis and Komotini, near the Greek border with Turkey.
Police said they were unable to immediately identify the victims.
Greek authorities have recorded over 14,000 irregular entries across the Turkish border so far this year, compared to some 5,500 in 2017, AFP writes.
The sharp increase in overland arrivals has been accompanied by successive deadly accidents in the north of the country, as illegal networks cram dozens of migrants into cars driven by teenagers.
Over a dozen refugees and migrants have been killed in such accidents in the last two months.