Prevent iPhone use after hours Is it possible to prevent myself from using my iPhone (except say for messages or phone calls) between certain hours? 

If it is not possible with a existing feature (or app?), is there something in macOS Server (or other "enterprise" tool) that would help?

I would like to get in the habit of not using my iPhone before bed.
You are in control. It is your responsibility.
Here are some suggestions you could try:

To help you keeping focus try a 'Stay focussed' app like Forest (which tries to convince you not to use your phone while the app is running).
To create a threshold you can enable restrictions. Go to Settings -&gt; General -&gt; Restrictions.
Shutdown your phone. The boot time will keep you from using your phone.
Edit settings in your router, some router can set internet access restrictions for certain devices during specified hours.