Most if not all guys experience it at some point in life, generally somewhere between adolesence and early 20s. And it goes away on its own with time.
If it continues to happen every day, try masturbation just before sleep.
If that does not help, see a doctor.