Srikrishna offers mayasura to build a palace to Pandavas
In Hindu mythology, Maya (मय), or Mayāsura (मयासुर) was a great ancient king of the Asura, Daitya and Rakshasa races upon earth. He was also the chief architect of the people of the netherworld. He was renowned for his architectural abilities. It is said he ruled over MayaRastra (present day Meerut in India). It was believed that Maya and his people could even melt stones for constructing their great architectural wonders.
He was the designer and king of the three flying cities, known as the Tripura. They were great cities of prosperity, power and dominance over the world, but due to their impious nature, Maya's cities were torched out of the sky by Lord Shiva. However, Maya escapes the destruction, as he is a devotee of Lord Shiva.
In the Ramāyana
He built his capital and called it Maya Rashtra, now Meerut. MayaAsura is mentioned in Uttar-kãņḍa of Rāmāyaṇa and here he is told be the son of Diti (wife of Kashyapa a SaptaRisi), He is the father of Mandodari, the beautiful wife of Ravana, the king of Lanka. Mayasura is also regarded as a hero and father-figure for many rakshasa, asura, and daitya heroes in Hindu epics.
In the Mahābhārata
When his life is spared by Krishna and Arjuna during the destruction of the Khandava forest, Maya offers his services to them. Krishna instructs Maya to construct a fabulous palace hall for Arjuna's elder brother, king Yudhisthira, at Indraprastha, which becomes the Mayasabha, renowned, beautiful and the largest of its kind. It had many specialities such as highly reflective floors that were easily mistaken as the surface of a pool of still water. There was also at least one pool of water, the surface of which mimicked a decorated floor, into which Duryodhana fell, and was subsequently taunted and humiliated by Draupadi.