Woke up this morning with lower back pain. This happened before, about 4 months ago. What can the problem be? I have gained a lot of weight. ..

Many things... Excess weight frequently contributes to musculoskeletal pain - sore backs, sore knees, etc. You may have strained it lifting something, using poor technique. There are other medical conditions that might explain back pain: menstrual cramps, urinary tract infections, endometriosis, etc. Alternating heat and ice can be a good first-line treatment. It's great you recognize now the impact of weight!