Samsung Galaxy Note 10.1 won’t turn on

Hi there,
I had a weird experience with my Galaxy Note 10.1 2014, it was charging normally and screen went off normally but when I tried pressing the home button to wake up the device, nothing happened, I tried plugging the charger again but there was no display, I checked everything, removed the battery, put it back and tried putting it on and it won't come on, but when I pressed the home button for around 30 seconds, it finally came on. What could be the problem? How do I avoid this experience again?
