Are you plugging into a different port? I was having a similar issue with waking from sleep after being disconnected and reconnected. Then I realized I was plugging into a different port each time, and once I set the position for the displays for each port I never had that issue again.
Might be partly due to plugging into different ports as somebody mentioned, but it does seem to happen randomly for me too. But I found this tool yesterday that makes it a lot simpler to solve https://github.com/jakehilborn/displayplacer - annoying that it doesn't work properly out of the box, of course