Amtrack is your friend.
For example, the 799 Pacific Surfliner leaves Union Station and would have you in San Luis Obispo 5 hours later. The area around Bishop Peak is stunning. Valencia trail is also very scenic.
Coach fare $40 (one way), $18 more for business. Train has wifi.
Lots of lodgings in SLO across a range of budgets.
But if 5 hours is too far, get the Amtrack schedule for the Surfliner and pick somewhere closer. Anywhere along the coast will be better than downtown LA.