Phrases involving the word 'head' with words such as 'out of', 'off' etc usually suggest that the person concerned is driven to mental distraction or even almost 'madness', as it were.
For example, if you are 'bored out of your skull', that means you are so mentally drained by the tedium that you are virtually demented. So, to 'laugh your head off' is to be so amused that you have effectively lost control of yourself...laughing uproariously or uncontrollably.