So I have a q about coconut oil!

Last night, I wet my hair and put coconut oil in it. Then I wrapped my hair in a towel and slept in it that way.

This morning I woke up and my hair was INSANELY curly! :O I then co-washed and styled my hair as usual.

My Q is: does coconut oil encourage curl formation? My hair is quite thin/fine, so I'm surprised. Also, I did a co-wash this morning, but will the benefits of the coconut oil stick in my hair?