Firstly try to reduce stiffness and stress on the back muscles. Try to do some mobility exercises and strengthening exercises directly don’t go for stretches.
Use proper pillow for neck .
Next Steps
After you feel a bit unlocked /easy ,try to do some back extensions Exercises ( easily available on google/search engines)
Health Tips
Sleep on firm mattress. Look for the positions causing you more pain Avoid those positions.