I have very bad back pain and cannot sleep, what can I do?

Evaluate and treat. Have it evaluated for possible causes then see how well it can be treated. You might consider seeking out osteopathic physician help (do). Osteopathic manipulation can be very effective at treating back pain, even at times without pain medication. Chronic back pain is one of the most common reasons for insomnia and has myriad causes. Do your best to find the cause and thoughtfully pursue treatment.
Need evaluation. The trigger response would be to give you a sleep aid or pain med at night; however, at age 41 the cause of your back pain is so severe that you can't sleep- you need to be evaluated by your PC and spine specialist. Have you had recent injury/trauma, history of high impact sports, or manual labor? Temporarily it's ok to treat the symptoms while it's taking time to work you up.