Is it safe?

Would it be safe for me to take Melatonin after I've taken Pepcid? Just wanna be sure it isn't going to be  harmful!