Lower back muscle strain. Better to lie on hard surface or bed for quicker recovery? Pain when sit, stand or walk. Bed rest for how long?

Not hard. For lower back pain latest advisory is avoid hard mattress & tend towards a medium between hard & soft for more even support for spine between shoulders & hips; enabling a fetal position, which might be most comfortable. But with this problem, which can be more than nagging, do whatever works to reduce pain. Some like lying on couch with head flat & legs up on farthest armrest.
See below. In general no bed rest unless pain is really severe. It is best to lay on whatever is most comfortable. Get up and do as much as you can. General rule of thumb is that if it hurts a little it is ok, but do not go to extremes and use good body mechanics. Try to keep one foot on a stool or rest. Do not stay in one position too long. If it really hurts don't do it. Time cures this.