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?
If you knew it was a sin to walk in front of the one who was praying and you walked in front of the one praying, then this is haram and you have to repent.
If the one praying had a sutra or something the size of a saddle's back/cantle in front of him then there is no problem.
Like any library, Islam Stack Exchange offers great information, but does not offer personalized advice or legal verdicts, and does not take the place of seeking such advice from your Mufti, Imam, or other trustworthy Counselor.