we have stayed overnight at several of the WY rest stops many times, with no problems. there is a nice one at Chugwater WY off I 25 and another nice one, further up, at the junction of I 25 and highway 18.
But if you're talking about a shallow, short pull off, I don't think that would be safe or permitted. You might come across one of those highway gravel supply places that is big and you can get off the highway. A cop probably wouldn't hassle you over that.
most little towns are safe enough to just pull over and park for the night.