You've got it perfectly. Actually, you go to sleep for 5-6 hours first to get yourself to the stages of sleep with quality, lengthy REM periods. That way, you WILD into those periods.
There are plenty of tutorials around to help you. Clairity's WILD tutorial is superb, and there's a few other which I don't know by name.
Good luck with your studying