It's acid reflux.
No, it's not the same thing as heartburn.
The valve on the top of your stomach isn't shutting all the way, and while it may not have been severe enough to cause actual heartburn symptoms, it's probably been going on for awhile (because you didn't have any symptoms you didn't know there was a problem), and now it's eaten a hole in your esophagus (sp) right above your stomach and acid from your stomach is now coming up into your lower esophagus and escaping into your body through the hole it's created over time.
That's why when you get up the pain stops, the acid stops running out of your stomach and why you don't have the pain during the day because you're up and moving around and gravity keeps your stomach acid down in your stomach.
This reason this condition seems so unlikely is because your stomach doesn't hurt, you are not having heartburn or any acid taste in your mouth, and you'll swear you're having a heart attack. When you're having stabbing-sharp pains in your chest, back, and neck you don't associate it with something that doesn't hurt at all (your stomach), you associate it with where the pain actually is.
First, lay off starchy carbs late in the day, especially before bedtime.
Second, call your Doc and ask for an endoscopy.
Sounds weird, I know, but it's exactly what I went through. Hurts like hell and you swear it's a heart attack. I didn't think it made sense at first either, but that's exactly what it was.
Tell you what, if you think I'm fulla shit (I didn't believe it either when it was happening to me), next time you have the pain run to the fridge and chug some milk (just plain-ass old milk). If it's the condition I described, it will kill the pain almost immediately. Your "heart attack" will be over in an instant. It's amazing how you can be in so much pain and have it completely gone in the snap of your fingers.
LMK if that helps.