Alternating pain relievers

mommaof1

My 11 month old has an ear infection. He got put on antibiotics yesterday, but still just screams for (what appears to be) no reason. I’m assuming his ears hurt, and I’ve been giving Tylenol. But someone said to alternate between that and Motrin? How often should I give them?