According to Hindu mythology, Kamdev established the Kamakhya temple. Relationships that prevail between time and creation are that time destroys everything. So, the temple too was destroyed in course of time. There is a mythological story. That explains the relationships that existed between the decaying of the temple and Maha Muni Bashisto Dev.
It is written in the Kalika Puran that Maha Muni Bashisto Dev used to stay at Sandhyachal Hills. The land of Kamrup was ruled by Narakashur at that time. One day, Bashisto Dev came to the Kamakhya temple to see Devi Kamakhya. The relationships that existed between them were not good. Narakashur prevented him to see Devi Kamakhya for some reason.
Bashisto Dev got angry with Narakashur, and he cursed Narakashur that so long he will be alive, Devi Kamakhya will be invisible. So, Devi went invisible then. The temple remained empty. Forest engulfed the place after some time.
In the eighth century, Shankaracharya, as a part of his promotional outreach for Hinduism, came here and rebuild the temple after cleaning up the forest. He re-established the Maha Pith. Though the temple was constructed, Devi Kamakhya did not become popular among common Hindus. Relationships that developed between people and the temple were not enough intimate.
In the year 1150, King Dharmapala of the Pala dynasty was ruling the west of Guwahati. He arranged the puja of Devi Kamakhya and for that, he appointed a few Brahmins and brought them from Kanyakubja. But puja was stopped after some time again. The temple was destroyed again after some passage of time.
King of Coachbehar Biswa Singha , invaded Kamrup to fight against King of Ahom. That was 1490. Once he along with his brother Shib Singha went on a night war expedition. He had their troop with him. But somehow, he and his brother lost touch with their troop. He lost his way and was trying to return on foot. At that time, he found himself in Kamakhya Hill.
The two brothers were thirsty, hungry, and tired. They were walking and looking for water. Suddenly, they saw a stream of bright light under a banyan tree. They found an old lady worshipping a piece of stone. Though they did not understand the accord between the stone and the old lady, they were delighted. That old lady helped them to a spring to drink water. Asked them to take a rest under the banyan tree.
Biswa Singha asked the old lady, whom she was worshiping in the stone. The old lady said that the tribes of these hills had a tie with the stone and worship the stone as Devi and believe that all their hardship can be overcome easily by the grace of Devi. The tribes sacrifice their domestic animals to the Devi and wish for anything they need. They were satisfied that they got everything they wish for.
King Biswa Singha was overwhelmed and believed what the old lady said. He prayed to the Devi and wished for a trouble-free kingdom and also wished to meet his lost troop. He promised to the Devi to build a golden temple and an arrangement of daily worshipping subject to fulfillment of his wishes.
He threw his ring in the stream and thought if he would get his ring back in the Ganga River at Kashi, he would doubtlessly believe the greatness of the Devi.
He surprisingly found his troop the next morning. His kingdom became thornless now. He became busy with the administrative work of his kingdom and forgot his promise of building the temple at Kamakhya Hill.
A few years later, he went to Kashi and astonishingly found his ring in the Ganga. He now remembered his promise. Back home, he told his whole story to the pandits. They researched Puranas and other books and concluded that the piece of stone was nothing but the vagina of Devi Kamakhya. They concluded that it was from Sati’s body, one part of fifty-one pieces. So, Kamakhya was a Maha Pith out of fifty-one Piths. Relationships that were established by the Pandits were of Sati Pith and Kamakhya.
King Biswa Singha went back to Nilachal Hill. He brought with him a large number of construction workers. They cleaned the forests and excavate the old temple and idol. The king constructed a new beautiful temple on the old foundation. He used some gold pieces in the construction. Daily worshipping of Devi Kamskhya was arranged.