Sex with an ex

My bf of 3 years and I broke up very abruptly. It was messy and ugly but there was no scandal or cheating, it was just time to break up. I recently began talking to him to get closure on both of our ends and we ended up having sex again. I want to do it again. I know we are at different points in our lives and the idea of getting back together is completely off the table. I can see he was great, but we are not great together. However, the sex is amazing. And he knows me and my body and what I like. It’s convenient. So is there serious harm to having sex again? Help!