Absolutely! One of my best friends ever started out as a casual sexual partner, after he flirted with me on the subway.
We got together once or twice a week for years for some energetic recreation, so to speak. I met his friends, he met mine, and I learned a lot about his very interesting profession. He introduced me to culture I was unaware of.
And then he fell in love with somebody and told me he wasn't comfortable continuing our sexual affair because his new partner wasn't comfortable with it.
And guess what?
We continued (for years) getting together once or twice a week for lunch and culture dates.
And why not?
I think that's a very positive example of a casual sexual relationship that turned into a very valuable friendship.