Check the footprint at two levels

Measure from the wall and bed frame to the edge of the route. Also check the mattress and comforter where you expect to put the table. A 12-inch table may fit near the floor while the bedding takes up the first two inches of its surface. If the table has a drawer, measure its full travel when open and see whether a bedside rug or bed rail gets in the way.

Try the height from your pillow

Stack a few sturdy boxes temporarily to the height you are considering and reach toward a dry cup. An inch or two can change whether your hand glides across the surface or has to lift up and over the rim. If a lamp would leave too little space beside the cup, compare a compact base with a smaller shade. Use the complete lamp width when you check the fit.