Gas drops and other medications

Is it safe to give gas drops and Motrin to a 13 month old? My son woke up from his normal bedtime crying not going back to bed so I thought he was teething and gave Motrin. When I picked him up to rock him back to bed he started tooting and felt a little bloated although he had just drank his bottle before bed. I’m debating on going to the store for gas drops but not sure if I can give them to him after giving Motrin.