Avoid any sudden strain. If you are going to have to bend in any way make sure that your back is not cold and stiff. Exercise regularly to loosen up the back and strengthen its supporting abdominal muscles. Stretching your back helps loosen it and prevent injury.
If you sit for long periods, make sure your back is properly supported. Place a small roll in the arch of your lower spine (at waist height) to maintain its normal S-curve. Simply a towel, or cushion rolled up will do.
When lifting, never bend down from the waist, lower and raise yourself at the knees. Keep your back straight and hold the object close to your body. If you are going to carry anything any distance that may be heavy, make sure that your way is clear. You do not want to be dodging around things when you are carrying.
Balance items you carry evenly on both sides of your body and hold them close or use a knapsack.
Sleep on your back if possible, with knees raised on a pillow. If you sleep on your side, a pillow between the knees is a big help.
If you need a firm bed, place a board between the mattress and the box spring.
Treatment
If you have an attack of severe back pain you should Limit activity or stay in bed for 48 hours. Any longer can make matters worse. The sooner you get mobile the better. Taking to your bed will only make matters worse.
Depending on which works better for you, apply either heat or a cold pack for 15 minutes at a time every couple of hours over a period of 2 days. A bag of frozen peas works well. Cold treatment does not work for everyone. I find that a heat pad is all I need.
Taking aspirin or ibuprofen will help to combat both the pain and inflammation. If you have trouble with your stomach, other medication is available through your doctor. Tell him you just need some in the cupboard for these emergencies.