If your trip is on one ticket, as I suspect is the case since you called your time in Doha a layover, you should receive your onward ticket out of Doha when you check in at your origin.
While your experience may vary, Al Maha would have been a complete waste of money for my recent trip where we spent the night in Doha. The business class immigration line had only two people in front of me, and security the next morning was a breeze.