Mr Obama had an Indonesian step-father and spent four years of his childhood in the country,
Speaking at the University of Indonesia in Jakarta, he said Indonesia was successfully combining an emerging democracy with economic growth and tolerance of other religions.
Earlier, the US and Indonesia announced an expansion of co-operation on economic matters, security and climate change.
Mr Obama criticised recent elections in Myanmar as neither free nor fair, and called for the release of jailed pro-democracy leader Aung San Suu Kyi.
It is his most high-profile attempt to reach out to the Islamic world since a landmark speech in Cairo in June 2009.