It could be a hardware issue--perhaps a loose connection somewhere. Any recent drops or trauma?
I sometimes hear of people who correct the problem by hitting the back of the tablet firmly (the Fonz approach, for those of you who remember Happy Days). If you're adventurous, you could try opening the back up and checking all of the connections yourself.
Fort the galaxy S4 I had the same problem I erase all the pictures I din't need and videos turn the phone off pluged in the computer usb port waited one hour turned back on while connected. Problem solve my wifi and bluetooth was on again