'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.