Ten Greek medical associations lodged a complaint at the European Court of Justice (ECJ) and were backed by the European Commission. The ECJ ruled in their favour, against Greek law.
The court said that Greek doctors "may have to work more than 24 consecutive hours and even up to 32 hours".
Greek healthcare has suffered major budget cuts under the EU bailout rules.
In 2008-2012 the cut in healthcare spending totalled 25%, a European Parliament report says.
According to the Athens government, the Greek healthcare system is short of 4,500 doctors as well as other medical and paramedical staff.
But Michael Vlastarakos, President of the Panhellenic Medical Association, said another 5,000 doctors and 15,000 nurses were needed.
In the public sector, where most people are cared for, doctors never get 11 hours' rest in a 24-hour period. Normally you get six to eight hours.
In my hospital when you have a night shift you are off the next day, so you don't continue working.
But provincial hospitals may have on-call every day - it depends how many doctors there are in each department, and many have a lack of doctors. They may do more than 24 hours continuously.
In the financial crisis more people are coming to the public service to be seen and waiting lists for surgery have increased. Waiting times have lengthened between a normal appointment and surgery, and that creates much stress for everyone.
They are not replacing medical staff who are on sick leave or who retire.
Heavily indebted Greece has drastically cut public spending, to make savings demanded by its international creditors - the EU and International Monetary Fund - in three bailouts since 2010.
The ECJ said Greek law violated the EU Working Time Directive, which stipulates that:
10%
of GDP went on healthcare in 2009
4%
of GDP is the expected spend for 2015
22%  decline in allocated hospital funding in 2015
5,000  more doctors needed
15,000 more nurses needed
On-call duty extended the time Greek doctors are required to be at work, the ECJ said.
The ruling also criticised the Greek practice of postponing the 24-hour rest period for a week after the end of a doctor's on-call period.
The working time rules do not apply to the private sector - but most Greeks use the public healthcare system.
The economic think-tank OECD says Greece has the lowest number of nurses per 1,000 population in Europe.

State-funded Holyport College near Maidenhead, opened to pupils for the first time in September.
The Queen and the Duke of Edinburgh were given a tour of the school before unveiling a plaque watched by its 122 pupils, staff and parents.
Holyport College, sponsored by Eton College, accepts boarders and gives its pupils access to some of Eton's facilities.
During the visit, the royal couple met Sir Nicholas Winton, who lives near the school which has named its reception building after him.
Sir Nicholas, dubbed the "British Schindler", helped to save hundreds of children, mainly from Jewish families, from the Nazis by transporting them by train from Prague to the UK in 1939.
The wheelchair-bound 105-year-old said: "I think it's a wonderful honour to have the building named after me.
"I hope the school will make contact with a school in the Czech Republic that is also named after me."
Other guests included Home Secretary Theresa May, MP for Maidenhead.
The school was proposed in February 2012 and then approved by the Department for Education through the free schools programme in June 2012.
Once it reaches capacity, the school will have 500 pupils, including 225 boarders aged 11-19 years.
Parents pay £3,850 a term for boarders but daytime education is free.
Free schools, which anyone can apply to set up, are funded directly by central government and are free from local council control.
The EU's top court says Greece is violating EU law by allowing doctors to work long hours without adequate rest.
[NEXT_CONCEPT]
A free school in Berkshire has been officially opened by the Queen.