Ruling on calling upon the angels before sleeping
Question

                Among some of the common people there is the widespread practice of saying, before going to sleep, “O guardian angels, wake me up at such-and-such a time.”
Praise be to Allah.This
      is not permissible, and in fact it is a form of major shirk (al-shirk
      al-akbar), because it involves calling upon someone other than Allaah and
      asking for something from one of the unseen creatures. This is like asking
      from the jinn or idols or the dead, because of the general meaning of the
      words of Allaah (interpretation of the meaning): 
“And
      the mosques are for Allaah (Alone), so invoke not anyone along with
      Allaah”[al-Jinn
      72:18]
“Such
      is Allaah, your Lord; His is the kingdom. And those, whom you invoke or
      call upon instead of Him, ownnot even a Qitmeer (the thin membrane over the date stone).
If
      you invoke (or call upon) them, they hear not your call; and if (in case)
      they were to hear, they could not grant it (your request) to you. And on
      the Day of Resurrection, they will
      disown your worshipping them. And none can inform you (O Muhammad) like
      Him Who is the All Knower (of everything)”[Faatir
      35:13-14]
 Allaah
      described calling upon anyone other than Him, such as the dead, idols, the
      jinn or the angels, as shirk or the association of others in worship with
      Him. He said (interpretation of the meaning) 
“And
      verily, there were men among mankind who took shelter with the males among
      the jinn, but they (jinn) increased them (mankind) in sin and
      transgression”[al-Jinn 72:6] 
“And
      whoever invokes (or worships), besides Allaah, any other ilaah (god), of
      whom he has no proof; then his reckoning is only with his Lord. Surely, Al
      Kaafiroon
      (the disbelievers in Allaah and in the Oneness of Allaah, polytheists,
      pagans, idolaters) will not be successful”[al-Mu’minoon
      23:117] 
So Allaah calls
      those who call upon anyone other than Him kaafireen.This applies to all those who call upon anyone other than Allaah,
      whether it be the dead, idols, jinn or angels; no one is exluded from that
      except one who is alive, present and able to help, because Allaah says in
      the story of Moosa (interpretation of the meaning): 
“The man of
      his (own) party [religion] asked him for help against his foe”[al-Qasas
      28:15] 
Examples of this
      shirk are to be found in what some people say, such as “O jinn, seize
      him” or “O seven (jinn), seize him” or “O jinn of the noon-time,
      seize him” or “O jinn of such-and-such a valley” or “O jinn of
      such-and-such a land”. All of this is major shirk and is calling upon
      unseen creatures instead of Allaah. If a person says, “O angels of
      Allaah, wake me up” or “protect me”, this is also major shirk, and
      if he says, “O jinn protect me” or “wake me up”, this is also
      major shirk. We seek refuge with Allaah from that. The Muslim must beware
      of that and must seek help from Allaah alone and ask from Him alone, for
      He is Sufficient and He is Able to do all things. Allaah is the One Who
      says (interpretation of the meaning): 
“And
      your Lord said: ‘Invoke Me [i.e. believe in My Oneness (Islamic
      Monotheism) and ask Me for anything] I will respond to your
      (invocation)’”[Ghaafir 40:60]
“And
      when My slaves ask you (O Muhammad) concerning Me, then (answer them), I
      am indeed near (to them by My Knowledge). I respond to the invocations of
      the supplicant when he calls on Me (without any mediator or intercessor).
      So let them obey Me and believe in Me, so that they may be led aright[al-Baqarah
      2:186] 
And the Prophet
       (peace and blessings of Allaah be upon him) said: “If you ask of
      anyone, then ask of Allaah, and if you seek help, then seek help from
      Allaah.” 
We ask Allaah to
      help us and all the Muslims to understand His religion and to keep us safe
      from the things that cause His wrath, for He is the All-Hearing, Ever
      Near.