Questions & Answers about Annem, “erken yat” diye beni uyardı.
diye links the quoted words to the main verb and means roughly “saying/with the words.” In Annem, erken yat diye beni uyardı, it tells us that the warning consisted of the words erken yat. It is the standard connector after many verbs (uyarmak, bağırmak, yazmak, düşünmek, sormak, vb.).
You could also use diyerek with a similar meaning of “by saying”: Annem, erken yat diyerek beni uyardı. Dropping diye removes the content of the warning: Annem beni uyardı.
Because uyarmak (“to warn”) takes a direct object in the accusative for the person being warned. Beni is the accusative form of ben.
- Correct: Annem beni uyardı.
- Incorrect: Annem bana uyardı.
By contrast, verbs like söylemek and demek take the dative for the person addressed: Annem bana söyledi/dedi.
Yat is the 2nd person singular imperative of yatmak (“to lie down; go to bed”). Inside the quoted words, a direct command is intended, so the imperative is used: erken yat = “go to bed early.”
Yatmak is just the dictionary form (“to go to bed”) and is not used for giving a command.