LONDON — Thousands of migrants who have been stranded on Greek islands will be offered 2,000 euros, or $2,230, to return to their home countries, the European Union said on Thursday, in an attempt to ease overcrowding in the camps and lighten the burden on Greece, which has faced an influx of arrivals in recent weeks.

During a visit in Athens, the European Union’s commissioner for home affairs, Ylva Johansson, said she hoped that up to 5,000 migrants would participate in the voluntary return scheme.

“This is an opportunity to release a bit the pressure on the islands and for the other people that are still in the camps,” Ms. Johansson said on Thursday about the program.

The scheme will remain open for a month and will be available only to those who arrived in Greece before Jan. 1.