A 8′ x 10′ rug will fit perfectly under a queen and king bed.
For smaller space a 5′ x 8′ will work under a Queen bed in a pinch.
If you have a larger area, opt for a 9′ x 12′ rug this will provide more square footage of softness.
Remember, you would like to have 12″ – 18″ of space between the rug and the wall.