It can be used as a sleep aid, but the user will more than likely wake up in the middle of the night when the GHB has worn off. Then most users have to take more to go back to sleep. It's supposed to make your body feel more rejuvinated as if you had gotten more sleep than you did along with the effects Nimrod mentioned.
It is also used recreationally to catch a "buzz." This can be very dangerous because it has some of the effects of alcohol such as loss of inhibitions, loss of balance, and your vision can be distorted, just to name a few. Most people get into trouble when they mix taking G and drinking together. It can make you sick and pass out, which then there is the chance you may choke on your own vomit. Also another side effect is getting caught with it. I didn't check where you are from but where I live possessing G has some very harsh consequences. i.e. It is considered a date rape drug.