As the question says. I'm aware that the use of に with verbs like 座る and 立つ is not actually "location" に, but the "target/destination" に. However with 寝る in particular, it's still very ambiguous for me, and I have seen 寝る plenty of times with both に and で.
The most recent sentence that threw me is: 「自分のベッドで寝る。」 "I sleep in my bed." Is there a reason に would be incorrect or less natural here?