I had a severe attack of lower back pain. Xray indicated no disc displacement and no bone lesion. But I m on bed and it seems to be muscular pain?

Muscularskeletal . X-ray is not an extremely useful tool here. Although there are other possibilities the most likely are an inflammation of what is called a facet joint, disc bulge or herniation, lumbar sprain or trigger points. I would begin treatment with drugs like advil (ibuprofen) which are ant inflammatory and analgesic, a muscle relaxant, physical therapy and possibly chiropractic care. An MRI to follow if needed.
How long? You indicate you have seen a doctor for an xray. You are thinking muscular pain because of the way it feels (intense, spasms, and tightness limiting your movements). Avoid bedrest for longer than 1-2 days. Use heat and stretch to get back to movement. Over the counter analgesics should help, but you will need a doctor to consider muscle relaxant medication or therapy. Muscle strains heal well.