All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
Your obedience to your mother requires that you should not leave your grandmother to sleep alone. Besides, you should teach and recommend her gently. As for the incorrect words she speaks with, you should explain to her in an easy and simple way that Allah, the Almighty, is An-Naafi’ (i.e., the Creator of Good) and Ad-Daarr (i.e., the Creator of Harm), and thus none other than Him, the Exalted, can create good or harm. Furthermore, no harm would afflict you because of these words, nor would they negatively affect your faith; however, you should recommend her and explain to her, for it is clear that she is ignorant of the essence of Tawheed (i.e., monotheism). May Allah guide her, open her heart to the truth and end her deeds and ours with what is good.
Allah knows the best.