Devshayani Ekadashi occurs on the 11th day of the bright lunar fortnight in the month of Aashad (July-August). ‘Dev’ means Lord and ‘Shayani’ means sleep thus, as suggested by the name itself, it is believed that starting from this day, Lord Vishnu goes on for four months long slumber which ends till Devotthan Ekadashi and during this time, he resides peacefully below the earth in Patal-lok. Hence this is also known as Harishayani Ekadashi or Prabodhini Ekadashi. This 4 months long duration is also known as Chaturmaas. All the auspicious activities like marriage; griha-pravesh etc. should be prohibited during this duration.
During Satyuga, there ruled a noble king named Mandhata in whose kingdom the people were living happily without any grieves. Once, his kingdom was affected by a severe drought and famine for about three years. The king was very fond of his people and so when he saw the pitiful condition of his subjects during drought, he was highly disturbed by their woes. Thus, to relieve his subjects of this endless pain and get the worthy solution to the problem the king drove towards the forest with his troops. While roaming through the forest, he came across the hermitage of Sage Angira: the son of Lord Brahma. On observing the King Mandhata standing with the folded hands in front of him, the saint Angira asked him about his motive for the visit. The king fell down at the feet of the saint and asked for his mercy and told him the reason for his woe. Then, saint Angira asked him to observe the fast on Ekadashi occurring in the month of Aashad and also told him that, if he will perform that fast religiously then it would surely lead to good rain and his kingdom will again prosper as before. Blessed by the saint, king Mandhata came back to his kingdom and observed the fast for the Devshayani Ekadashi religiously. Soon, by the effect of his religious prayers and grace of the Lord Vishnu there was heavy rain in his kingdom which leads to greenery and prosperity everywhere. Thus, one observing fast and performing special prayers of lord Vishnu on this day will fulfill all desires and wash off all the sins and attains salvation.