Whenever I go to bed, after an hour or two, I have severe back pain. And I didn't feel such pain when I am standing, sitting or walking?

Go see your doctor. Pain that wakes you up at night is a red flag that something more serious could be going on. Not to scare you, but this is worth getting evaluated further by your doctor.
May need new mattres. Could be almost anything but try a firm mattress first next see a good doctor gbr.