So I was really sad about a certain situation which is why I was very absent-minded and I walked into the bedroom without paying attention & I accidentally laid down on the bed without noticing that I was right in front of one of my family members who was praying. I immediately walked away but now I wanna know do I have to do anything else except repenting? Do I have to apologize to the person? Do they have to do anything?
"The majority of scholars say that his prayer is interrupted in the sense of being rendered imperfect, but the correct view is that it is interrupted in the sense that he has to repeat it. So if it is an obligatory prayer then he has to repeat it. So he has to repeat it if one of these three pass in front of the worshipper between him and his sutrah, he has to repeat the prayer."
The one who is praying should have a Sutrah infront of him, so it is the person's obligation to take care of it, and not yours. If you did not see or notice a person praying, then inshallah it is not a problem, if you did, then repent. Make sure to also inform your family member that he should repeat it if you passed by him while the one prayed and that he should either face a wall or have a proper Sutrah which is defined in the Sunnah.