With Allah the best fasting is that of David and the best prayer is that of David (peace be upon him) for he slept half of the night and stood for prayer for the third of it and (then) slept the sixth part of it and he observed fast one day and broke on the other.
قَالَ رَسُولُ اللَّهِ ﷺ إِنَّ أَحَبَّ الصِّيَامِ إِلَى اللَّهِ صِيَامُ دَاوُدَ وَأَحَبَّ الصَّلاَةِ إِلَى اللَّهِ صَلاَةُ دَاوُدَ عَلَيْهِ السَّلاَمُ كَانَ يَنَامُ نِصْفَ اللَّيْلِ وَيَقُومُ ثُلُثَهُ وَيَنَامُ سُدُسَهُ وَكَانَ يَصُومُ يَوْمًا وَيُفْطِرُ يَوْمًا