I am using a Toshiba Satellia M40-JM3. I've had this problem for a while, even took it into Future Shop and the gorons there claimed they fixed it after holding onto it for 10 days when they did nothing at all. The laptop is only a month old and the DVD drive decides it doesn't exist fairly often. Usually if I boot the computer with a cd then the drive shows up. The drive also sometimes disappears in the middle of using the computer, usually after coming out of hibernation, even with a cd in it. Trying to search for new devices in device manager doesn't detect it after it's gone, neither does the add hardware in the control panel. I've been looking all over to try to figure out how to fix it myself, i could use some help.

Sounds like a loose/faulty power or data cable. Replace and see. If this doesn't help, the mobo or the optical drive may be at fault. Contact Toshiba for a diagnostic.

If it is this new it's still under warranty, don't play with it yourself, take it back and remind the tech that the most common practice in trouble shooting these types of problems is to change out the units, data and power cords, DVD, and PSU, and that the manufacturer is paying the bill. As far as setting a fire under their arse for a quick repair, Good Luck!