Alarm often does not ring if I don't "wake up" the phone The phone is a Samsung Galaxy J3 running Android 5.1.1. It is only a couple of months old. This phone has not been rooted.

When I set an alarm, very often the phone does not wake up and ring when the time comes up. However if I press the power button to open the unlocking screen the alarm starts going off, as if the phone was catching up to the current time.

I changed to using the application Timely, after seeing similar questions on the Internet about the built-in alarm app. I still have the exact same problem.

My phone is always on vibrate. I haven't made any tests as to whether that changes anything but I don't think it will, because sporadically the alarm does ring at the right time.
Keep your phone charged up
This is a solution I found after experimenting a bit. It seems that if the phone is plugged to a power source the entire night, then it will correctly wake up to ring the alarm at the right time.
This is obviously not the most convenient solution nor does it really explain why this solves the problem.