One must form the intention to observe the obligatory fast during the night. If he does so but does not wake until after dawn has already broken, he must nevertheless refrain from eating and drinking, and—God willing—his fast is perfectly valid.
It is recommended to break the fast promptly once sunset is confirmed, whether by actually seeing the sun disappear or by relying on a trustworthy report such as the call to prayer. Sahl ibn Saʿd reported that the Prophet ﷺ said, “People will remain upon goodness so long as they hasten to break the fast” (agreed upon). In a hadith qudsi the Prophet ﷺ quoted his Lord as saying, “The most beloved of My servants to Me are those who are quickest to break their fast.”
The sunnah is to break the fast with fresh dates; if none are available, then with dried dates; and if those are not available, then with water. Anas d. Allah be pleased with him—narrated: “The Prophet ﷺ would break his fast before praying with fresh dates; if none were available, then with dried dates; and if none were available, he would take a few sips of water.” Ahmad, Abū Dāwūd, and al-Tirmidhī collected this report. Should a person find no dates or water, he may break the fast with whatever food or drink is on hand.