Most present-day coral reefs were formed after the last ice age when melting ice caused the sea level to rise and flood the continental shelves . Most coral reefs were formed after the last glacial period when melting ice caused the sea level to rise and flood the continental shelves .