كتاب الصيام
13  
The Book of Fasting
(35)
Chapter: Prohibition of Fasting for a lifetime for the one who will be harmed by that or who will neglect other duties, or does not break his fast on the two 'Ids or during the days of At-Tashriq; It is better to fast alternate days
(35)
بَاب النَّهْيِ عَنْ صَوْمِ الدَّهْرِ لِمَنْ تَضَرَّرَ بِهِ أَوْ فَوَّتَ بِهِ حَقًّا أَوْ لَمْ يُفْطِرْ الْعِيدَيْنِ وَالتَّشْرِيقَ وَبَيَانِ تَفْضِيلِ صَوْمِ يَوْمٍ وَإِفْطَارِ يَوْمٍ
Sahih Muslim 1159 k

'Abdullah b. 'Amr (Allah be pleased with both of them) reported Allah's Messenger (ﷺ) as saying:

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.
وَحَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، وَزُهَيْرُ بْنُ حَرْبٍ، قَالَ زُهَيْرٌ حَدَّثَنَا سُفْيَانُ بْنُ، عُيَيْنَةَ عَنْ عَمْرِو بْنِ دِينَارٍ، عَنْ عَمْرِو بْنِ أَوْسٍ، عَنْ عَبْدِ اللَّهِ بْنِ عَمْرٍو، - رضى الله عنهما - قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏ "‏ إِنَّ أَحَبَّ الصِّيَامِ إِلَى اللَّهِ صِيَامُ دَاوُدَ وَأَحَبَّ الصَّلاَةِ إِلَى اللَّهِ صَلاَةُ دَاوُدَ عَلَيْهِ السَّلاَمُ كَانَ يَنَامُ نِصْفَ اللَّيْلِ وَيَقُومُ ثُلُثَهُ وَيَنَامُ سُدُسَهُ وَكَانَ يَصُومُ يَوْمًا وَيُفْطِرُ يَوْمًا ‏"‏ ‏.‏
Reference : Sahih Muslim 1159k
In-book reference : Book 13, Hadith 245
USC-MSA web (English) reference : Book 6, Hadith 2595
  (deprecated numbering scheme)