This is usually the first sign that a cat has a urinary tract infection or urinary stones, especially if this is abnormal behavior. You will want to see the vet as soon as you can for a urine culture to find out what's going on.
UTI's are pretty painful and urinary stones can cause a blockage that could be life threatening.
Be sure to use a little feliway on the bed to deter her from peeing there again, just in case this is a behavioral problem. But I would bet that it's not.
Also, keep in mind that cats are more hesitant to use their litter box as they age if the sides are high. Arthritic changes can make climbing in and out of the box painful. So, be sure to buy a box with low sides if this is a problem.
Let me know if you still have questions.