A bedroom rug does one job before it does anything else: it marks out the floor around the bed. Where it sits decides whether bare feet land on it in the morning, whether the nightstands stand level, and whether the doors swing clear of it. There is not one correct placement. There are four common ones, and which suits a room depends mostly on the size of the room, the size of the rug, and where the furniture and doors are.
If the room does not have a rug yet, working out the right size for the space comes before worrying about where it goes. Once a size is settled, one of the four placements below will fit.
Full Coverage Under the Bed

A rug large enough to sit under the whole bed and both nightstands, with a margin on every open side, works when the room has floor to spare. The size depends on the bed. As an example, a queen bed is 60 inches wide, and with a 24-inch nightstand on each side the group measures 108 inches across, which fits on the 120-inch side of an 8×10 rug. A king is 76 inches wide, so the same nightstands bring the group to 124 inches. That is wider than an 8×10 and fits inside the 144-inch side of a 9×12. Before adding a rug this size, it is worth confirming the bed itself is sized correctly for the room, since a large rug makes a bed that is already a stretch for the space more obvious.
When the room supports it, the rug becomes the floor of the sleeping area, and every piece of furniture on it stands level. The tradeoff is cost and scale. The rug also needs bare floor around it, and a foot or more between rug and wall is the usual aim. A 9×12 rug in a room 12 feet wide runs wall to wall in that direction, with no floor showing on either side. Check as well that the bedroom and closet doors swing clear of the rug’s edge.
Two-Thirds Under the Bed

This is the most common placement, and the one that works across the widest range of bedrooms. The rug lies across the bed and starts a few inches in front of the nightstands, so the lower two-thirds of the bed sits on it, and a rug deep enough also runs out past the foot. The nightstands and the head of the bed stay on bare floor. A useful starting point is 18 to 24 inches of rug showing beyond each side of the bed frame, enough for both feet to land on it.
The side margin is easy to work out. Subtract the width of the bed from the long side of the rug and halve the result. A 6×9 rug under a queen leaves 24 inches a side. An 8×10 leaves 30 inches a side under a queen and 22 under a king. A 5×8 under a queen leaves 18, the low end of the range. Bed frames often run a few inches wider than the mattress, so measure the frame.
The 18 to 24 inches is a common guideline, not a fixed measurement. A slightly narrower margin still works as long as there is enough rug to stand on beside the bed.
A Rug at the Foot of the Bed

When the rug on hand is too small to run under the bed, it can sit on the floor just past the foot, parallel to the end of the bed and centered on its width, without touching the frame. It will not be underfoot when getting out of bed. What it gives is a soft place to stand while dressing, and a base for a bench if there is one.
This fits a smaller secondary bedroom or a guest room especially well, where the bed already takes up most of the floor and there is no realistic way to fit a rug underneath it without pushing every other piece of furniture against the walls.
A Centered Rug That Does Not Touch the Bed

In a small bedroom, the better move is sometimes keeping the rug clear of the bed and centering it in whatever open floor remains. A visible strip of floor around the rug’s edges tends to make a tight room look larger than a rug pushed edge to edge would, since the floor can be seen continuing past it.
Like the rug at the foot, this placement gives up a soft landing beside the bed. In exchange, no furniture straddles the rug’s edge, and it is often the option that crowds a small room least.
Where the Rug’s Edge Should Fall
Two-thirds placement puts the legs at the foot of the bed on the rug and the legs at the head on bare floor, and that is fine. A bed is heavy and its legs are far apart, so on most rugs the small difference in height neither shows nor rocks. What to avoid is an edge that falls under a small piece of furniture. A nightstand with two legs on a thick rug and two on the floor tilts, and so does a chair. Keep each small piece fully on the rug or fully off it, and treat a pair the same way, so both nightstands are on or both are off.
Two more checks apply to every placement. Keep the rug square to the bed and centered on it, so the margin matches on both sides. And if an edge lands right at a leg of the bed, shift the rug a few inches so the leg is clearly on it or clearly off.