Praise be to Allah, the Lord of the World; and may His blessings and peace be upon our Prophet Muhammad and upon all his Family and Companions.
Turning on a radio or a tape recorder with recitation of the Qur'an before sleeping and leaving it functioning after sleeping is permissible. It is even advisable since it will keep away Satans and protect the person against evils.
Allah knows best.