You cannot sleep here. There is no night skip, because a night on this server is a real night, and skipping it would mean skipping a real day. See Your own sky.
So a bed is not really a bed. It is a spawn point with a quilt on it.
A bed goes on claimed town land
You can place a bed inside a town's claims. Town land, nation land and outposts all count.
What you get instead
You already chose where you come back, when you stood on the hub map in Choosing where you live. Until you are in a town, that homeland is your respawn, and it picks a fresh point inside it each time.
Both of those places are somewhere you chose. Neither is a random hole in the wilderness. What a town adds is a fixed point instead of a range, which is one of the reasons a town is worth joining. See Towns.
Two details worth knowing
- If the claim under your bed goes away later, your spawn still works. You just cannot replace the bed once it is broken.
- A bed in the Nether or the End explodes, exactly as in vanilla, and sets nothing. Respawn anchors are the other way round: they do not work in an overworld at all.
On the polar map, beds, respawn anchors and nether portals are all refused, claimed land or not.
The one compensation
Phantoms are off, so bats carry the membrane instead. Kill a bat yourself and there is about a one in three chance it drops one.