I suppose the obvious answer is to communicate up front about what you each expect or are looking for. That’s not an easy conversation to have though. If the only time a person messages you is late at night, and the content of those messages is mostly about sex, I’d say it’s pretty clear what their intentions are.