Baby only wants to sleep curled up


My son will only sleep in his swing or in my arms and frequently ends up like this:

He’s just determined to be in the fetal position or close to it.

Is there any way to safely let him sleep like this but in a crib/bassinet? He absolutely will not fall asleep flat on his back in the crib, he immediately rolls himself to his side (he’s only 5 weeks!) and fusses/screams.