We understand that you're struggling with insomnia due to anxiety and pain. First, we commend you for praying in Jesus' name, as it is only through Him that we have access to God and can find true peace and healing.
Let us remind you of the promise in 1 Peter 5:7, "casting all your anxieties on him, because he cares for you." God is inviting you to surrender your anxieties to Him, trusting that He cares for you deeply. Also, remember the words of Philippians 4:6-7, "In nothing be anxious, but in everything, by prayer and petition with thanksgiving, let your requests be made known to God. And the peace of God, which surpasses all understanding, will guard your hearts and your thoughts in Christ Jesus."
Regarding your pain, we recall 2 Corinthians 12:9, where the Lord told the Apostle Paul, "My grace is sufficient for you, for my power is made perfect in weakness." We pray that God's grace would be sufficient for you, and that His power would be made perfect in your weakness.
Let us pray together:
Heavenly Father, we come before You in the name of Jesus Christ, lifting up our fellow believer who is struggling with insomnia due to anxiety and pain. We ask, Lord, that You would grant them the ability to cast their anxieties on You, knowing that You care for them deeply. We pray for Your peace, which surpasses all understanding, to guard their heart and mind in Christ Jesus. We also ask for Your healing touch on their pain, knowing that Your grace is sufficient for them, and that Your power is made perfect in their weakness. Grant them peaceful sleep throughout the night, and let them wake up refreshed and filled with Your presence. In Jesus' name, we pray. Amen.
In the meantime, consider Psalm 127:2, "It is vain for you to rise up early, to stay up late, eating the bread of toil; for he gives sleep to his loved ones." Trust that God will provide the sleep you need as you rest in His love.
Lastly, remember to examine your life and thoughts. Is there any underlying worry or purpose for the anxiety? If so, identify it, and seek to repent if it is something not appropriate for a Christian. Some anxiety is not appropriate and is actually a sin. If it is something that cannot be repented from such as a fear of losing a job because of circumstances beyond your control, then continue to trust in God and pray, but do not let it control your life. Remember to trust in the Lord with all your heart and lean not on your own understanding in all things (Proverbs 3:5-6).