Had a dream of my ex.

So I've been with my boyfriend for almost 2 years and last night was the first night I dreamt of me and my ex having sex. I woke up feeling terrible because I live with my boyfriend and I felt like that was so wrong but not like I could control my dreaming..