When it sounds like there are bugs crawling on your pillow when you put your ear against it, the most likely cause is your own body sounds or even tinnitus being amplified by the quiet environment of your bedroom.
In some cases it could be actual insects near you but in most cases it's just your own body sounds being amplified and being more noticeable.
Subtle movements of your neck, head or even your jaw can also be amplified by the pillow.
And even movement of your chest against the pillow can create a rustling sound.
And your heartbeat can also be more noticeable when you lay down and the sound can also travel through your pillow.
Also different pillow fillings such as feathers or certain types of foam can also make the rustling or crackling sounds when compressed.
And the pillowcase or the pillow itself can also rub against your ear or the bed frame and produce a scratching sound.
Tinnitus, which is a ringing or a buzzing sound in the ears can also become amplified and more noticeable when it's quiet such as when you're in your bed and the pillow can also amplify the sounds.
You could try using a white noise machine or fan or other white noise to mask the sound and create a less silent environment which can help.