Close all background apps. Double tap home button. Active task bar appears tap and hold any icon until it wobbles and displays a red minus sign then tap the red minus sign on all active background apps. This does not delete programs, it removes them from memory.
Once active task bar is empty tap home button to return to home screen. Once on home screen press and hold the power button until the power off slider appears. Slide to power off. Once powered down power back up and see if problem has stopped. A power cycle alone does not remove background apps which would explain your recurring unprompted restarts.
There is lots of good advice and info on here plus plenty of members all too willing to help with any problems.
Remember, search is your friend. If you can't find the answer you need and you post a question then give as much info as you can to help members help you i.e. iPad 1 or 2, iOS version and name of app if the problem is with a specific app........and please don't forget to read the rules http://www.ipadforums.net/forum-rules-help-info/2119-forum-rules-everybody-please-read.html
You can download the manual for your iPad here http://support.apple.com/manuals/ and in iBooks search for "iPad user guide for" and you will find free comprehensive manuals for both iOS 4 and 5.
If you have other Apple products or are interested in other Apple kit then why not join our sister forum too at http://www.appleforums.net/