I can never decide this myself, so what I usually do is just fall asleep directly outside their front door to maintain a happy medium. It’s super hot.
But for you, the best rule of thumb is always to read the individual situation and make an in-situ assessment. If it feels right, you’ve got chemistry and everything’s going great, then ask if you can stay (“ask” being the operative word here). That’s fine. But, if you feel like galloping away while screaming and waving your arms like you’ve been smited with St. Vitus’s fire, then run little pony. Run free.
However, if you’d prefer a more technical measurement of go-ness or stay-ness, let me just help you with a little statistic — nine times out of ten, you can bet your sweet dick your partner wants you to leave.
Why? Because trying to sleep next to someone new, who you hardly know, is an American nightmare. There’s the snoring, the blanket stealing, the unrestful sleep and the night terrors — all things that are tolerable when you like someone, but intolerable when the person doing them is a stranger you have to pretend to be happy to see in the morning. Saving from that is, in a way, doing them a favor. Write it off on your taxes!
… But wait … what's that you say?
I can hear you now, trying to argue that staying over makes the other person feel less used. That’s valid, but listen to daddy — it was a one-night stand. If it was consensual and enjoyable, you used each other. You didn’t go over there to start a family; you went over there for fucking. If you make that clear in your interaction with them beforehand, the nature of a one-night-stand dictates you can leave when you please — you’re under no obligation to snuggle this person while you pretend to sleep for an additional seven hours … unless it feels right and good to do that!
Look though — no one’s saying that, if you leave, that you can’t be a stand-up guy or girl and text them something nice afterwards. You can say you had a great time and you hope they have a great day/week/life. You can even keep the conversation going if you liked them. That way, you pull off the delicate maneuver of balancing kind caringness with the impersonality of casual sex without putting yourself through the excruciation of listening to them snore-fart the melody of the National Anthem.