Ball Python's in the wild live underground in little burrows, so this is normal. Though it's possible you don't have a dark enough hide that he can feel safe in, check on that!
If you have an UTH make sure the glass/plastic of the enclosure isn't getting hot enough to burn him since he's probably against it.