The great scholar Allama Majlesi, who is one of the unique scholars of Shia, has got explanation about the verses of holy Quran which are regarding Hazrat David (AS) and his life. Allama Majlesi quotes a tradition about Hazrat David (AS) that how he used to love prayer and how he was fond of pray, he says: “Hazrat David (AS) had made many altars (Mehrabs) at his home in different place of the house, because he wanted to perform his prayer in all places of the his house, he had divided his time into four parts. A day for solving the problems of people, a day for his wife and family, a day for pray and do worship of God in caves or close to the rivers and a day for pray and worship in different places of house”. Imam Sadiq (AS) says: while he (Hazrat David (AS)) used to pray, God used to talk to him[1].
source : Aspect of Prayer By Husayn Ansarian