There really are very few rules in keeping chickens. There are a lot of guidelines to help people that don’t have the experience but you’ll find people violate many of those guidelines all the time. We keep them in so many different conditions and using widely varying management techniques there can’t be one right or wrong answer for all of us. I can’t really think of any guidelines about positioning nests other than the roost rule.
It’s hard to talk about placing nest boxes without talking about roosts. Chickens generally like to roost as high as they can get. They poop a lot at night. You don’t want them sleeping in the nests so your roosts need to be higher than the nest boxes. That is a rule.
Where you put them height-wise will depend some on how your coop is built and some on personal preference. If you don’t have much height in your coop you can’t raise them very high and keep them lower than the roosts.
Some people like them setting on the coop floor. It depends on how the nest is built but it’s possible the chickens can scratch trash and maybe even poop in the nest. If it’s open on top with high enough sides, that shouldn’t be a problem. Some people with bad backs like them high enough they don’t have to bend over to get the eggs.
If they are real close to the floor so the chickens cannot get under there, and remember to count bedding height, it’s possible mice will build a nest under there. Chickens eat mice so if they can get under the nests, mice won’t nest under there.
If chickens can get under there and it looks kind of protected, hens may decide it would make a good place to lay an egg. I like having enough room so I can at least see what is going on under there.
I personally like to see in the nest before I stick my hand in there. I’ve seen a snake in the nest a few times. My heart gets going fast enough just seeing one. My heart really doesn’t need for me to find out it’s there by sense of touch.
As you can probably see, most of this is personal preference. I think you’ll find the chickens don’t really care. People do.