Sleep studies are painless. There's a small risk of skin irritation from the sensors. The irritation will go away once the sensors are removed.
Although the risks of sleep studies are minimal, these studies take time (at least several hours). If you're having a daytime sleep study, bring a book or something to do during the test.