An Iowa boy was used to sharing a room with his big sister, but when his family moved into a new house and he got a room of his own, the six-year-old said he couldn't stop scary thoughts that were creeping into his head. So Eldridge Police Officer Bruce Schwartz visited the family's home to ease the boy's worries by checking throughout the home to ensure no "bad guys" were hiding.

Amanda Williams' family had just moved into their new home in Eldridge, Iowa when her six-year-old son, who previously shared a room with his 15-year-old sister, started to experience anxiety around bedtime. The worries got so bad that Hayden asked his mom to call a doctor or a police officer to help him.

"He believes in [superheroes]. He believes in 'bad guys' and all other things that appear real to him," the mom shared on Facebook. "He knows a police officer and a doctor help people."

Amanda told KCCI that she believes many of these anxieties stemmed from Hayden accidentally seeing commercials for the horror movies Annabelle and It, despite the family's strict internet and TV time rules. The mom, who is a makeup artist, tried to show Hayden that the actors were playing make-believe and using makeup to become spooky, but it did not ease the boy’s worries.

After many failed attempts of encouraging and comforting Hayden into sleeping in his own room, including weighted blankets, night lights, monster spray and allowing the dog to sleep with him, Amanda brought her son to the police station to speak with an officer, KCCI reported.

At the Eldridge Police Department, Amanda and Hayden spoke with Officer Bruce Schwartz, who they knew from his work at the local high school. In a private room, Schwartz listened to the family's concerns.

Then, Hayden asked the officer if he would check the house to make sure it was safe. Schwartz, with what Amanda calls "empathy and compassion," agreed.

While checking the home, Schwartz explained to Hayden that all the spaces he may find scary in his new home didn't actually have any threat. He even told him how he coped with the scary thoughts he had after working as a police officer all day.

Story continues

Schwartz told Hayden that when he lays down, he thinks of happy things. The officer told the six-year-old that he pictures riding a horse and being a cowboy.

Despite putting up a three-hour fight about going to bed, Amanda said that Hayden finally slept in his room the whole night, and he was incredibly proud of himself the next morning.

That morning was also his first day of school.

"As I was snapping back to school pictures of Hayden this morning, Hayden’s face suddenly lit up and he said look mama, officer Schwartz is here," Amanda wrote. "He came to see how Hayden did at bedtime last night and got some 1st day of school pictures with him."

"I thought of being a cowboy, just like you," Hayden told Schwartz.

"Officer Schwartz... thank you from the bottom of my mama heart," Amanda wrote. "The kindness you’ve shown Hayden certainly doesn’t go unnoticed and I know he will remember this forever."

Amanda Williams and the Eldridge Police Department did not immediately respond to Yahoo Lifestyle’s requests for comment.

Read more from Yahoo Lifestyle:

Follow us on Instagram, Facebook and Twitter for nonstop inspiration delivered fresh to your feed, every day.