Android Question

Hello! I'm wondering if there is a Do Not Disturb mode on android (particularly the Samsung Galaxy Mega) like they do on Apple products? And if there is, I'm wondering if it blocks the alarm as well? I mean, logically that would be stupid if it did but just to make sure. And also, if there is one, would it block incoming calls and textmessages as well? Because I don't want that. I tend on using this when I'm sleeping so I don't wake up from unimportant app notifications.

Thanks in advance!