Is 9mth old too young for a really really flat pillow?

DS has been having sleeping issues for weeks now. A few nights ago I tried one of my flat as a wall pillows and it seems to work!! He has been sleeping all night 8:30pm-6:30am (knock on wood).

I do get nervous though and I take it out after a while. Can I leave it?