Question:
Is it lawful to pray Salah when somebody is sleeping in front of you on a bed?
Answer:
If the individual is facing the other direction then one can perform Salah, but it is better to avoid it. However, if that individual turns their face in your direction then it may be possible to attract your concentration, so it is better to avoid praying when someone is sleeping in front of you.
And Allah ﷻ knows the best
Imam Ahmad Rida Khan رحمة الله تعالى عليه
Translation by Dr Musharraf Hussain Al-Azhari Translator of Majestic Quran, www.majesticquran.co.uk