Authentic Supplication Number 40.

The Messenger of Allah  used to teach them certain words for if they would become startled [in their sleep] ‘A`outhu (62) bikalimatil-lahi ‘attammeti, min ghadhabihi wa sharri `ibadihi, wa min hamazatish-shayateeni, wa ‘an yahdhuroona (63).

Footnotes.
(62) Tirmithi’s narration goes like this “Would it be that one of you is startled in his sleep then let him say: ‘A`outhu…”

(63) I seek protection in the perfect words of Allah from his anger, the evil of his creation, from the instigation’s of the shayateen [plural of shaytan], and from their coming near me.

Reporters.
Reported by Abu Dawood, and the wording of his report of the hadeeth explains that the supplication is said when startled in sleep. It is also reported by At-Tirmithi who said it was comely. Al-Albani said that At-Tirmithi meant comely not on its own right, but comely due to other than it. Al-Albani said he agreed because there is sent (mursal) hadeeth that serves as testimonial for this one and strengthens it to the level of a comely hadeeth. A sent, or mursal hadeeth is one whose ascription does not include the name of the companion who heard it from the Prophet . Al-Albãni included this haddeth in The Authentic of Good Sayings as #38.