Images on social media last night showed the vehicle had come to rest near some houses.
“I have no words to describe what happened. I cannot face the suffering of these people,” Mayor Filipe Sousa told broadcaster SIC TV.
He said all the tourists on the bus were German, but it was not clear if the fatalities occurred only in the bus.
The deaths were confirmed by Lusa, the national news agency. The victims are 17 women and 11 men.
A spokeswoman for the Foreign Office said it was standing by to provide support to any British people affected.
She said: “We are seeking information from the authorities in Portugal about a bus crash in Madeira and are ready to support any British people who require assistance.”
Local television showed bodies scattered over the rural hillside next to the Atlantic Ocean.
Residents say the weather was fine at the time of the accident, which happened in daylight.
Authorities say they are investigating the cause of the crash.