LS,

The loud talking is inconsiderate, just like the texting in front of you. Yes, you should stand up for yourself. I would not thank her, that is not saying what you mean. I would tell her the plain truth. That you need your sleep. This is your home. She should show consideration and not wake you up, especially with her affair. She should be as considerate to her family as she would be to a stranger. If a stranger were sleeping nearby, she would not be loud and wake them. You deserve no less consideration.